Potentiometric and amperometric gas sensors based on the protonic conduction of layered zirconium phosphates and phosphonates