Broadband frequency conversion and shaping of single photons emitted from a nonlinear cavity