Thiol–bromo click polymerization for multifunctional polymers: synthesis, light refraction, aggregation-induced emission and explosive detection