Photoluminescence and optical nonlinearity of CdS quantum dots synthesized in a functional copolymer hydrogel template