Photon-induced synthesis of ultrafine metal nanoparticles on graphene as electrocatalysts: impact of functionalization and doping