Itinerant density wave instabilities at classical and quantum critical points