Fluorescent pH sensor constructed from a heteroatom-containing luminogen with tunable AIE and ICT characteristics