Acid-base properties of N-methyl-substituted 1,2-dihydroquinolines in the ground and excited states