The unimolecular chemistry of quaternary ammonium ions and their neutral counterparts