Synthesis of Two-Dimensional Nanomaterials for Contaminant Removal, Resource Recovery, and Ion-Selective Monitoring