Metal chalcogenide nanoparticle gel networks: their formation mechanism and application for novel material generation and heavy metal remediation via cation exchange reactions