Point spread function engineering for super-resolution single-photon and multiphoton fluorescence microscopy