Nonlinear wavefront shaping with optically induced three-dimensional nonlinear photonic crystals