Polymer-Based Advanced Functional Materials for Energy and Environmental Applications