Emergency services came under attack in Edinburgh on Bonfire Night after teenagers aimed fireworks, petrol bombs and other projectiles at officers.