A Perspective on the Application of Covalent Organic Frameworks for Detection and Water Treatment