Preparation of microporous polymer-encapsulated Pd nanoparticles and their catalytic performance for hydrogenation and oxidation