Water treatment using carbon nanomaterials