Synthesis, characterization, and electrocatalysis using Pt and Pd dendrimer-encapsulated nanoparticles prepared by galvanic exchange