Use of polymeric catalysts in the pore-size-specific functionalization of porous polymers