Two teenage boys who launched fireworks at police on Bonfire Night have been sentenced for violent disorder.