Greek riot police have fired tear gas to disperse rioters throwing petrol bombs and stones, as thousands protest in the capital, Athens, against new austerity measures.