Cooperative Semantic Segmentation and Image Restoration in Adverse Environmental Conditions