Anion-controlled photochromism of two bipyridinium-based coordination polymers and nondestructive luminescence readout.