Green Preparation of Functionalized Porous Carbon Materials and Their Application in Water Pollution Control