Ammonia as a case study for the spontaneous ionization of a simple hydrogen-bonded compound