Ionization equilibria and electronic spectroscopy of the chelating quinolinecarboxylic acids