Sensing and antibacterial activity of imidazolium-based conjugated polydiacetylenes.