Dynamical response of a dipole near the surface of a nonlocal metal