Unveiling the potential of a functionalized pyrrole-based polymer for efficient cadmium ion removal from wastewater: synthesis, characterization, and performance evaluation