Cascade sensing of gold and thiols with imidazole-bearing functional porphyrins.