Competition between inter- and intramolecular hydrogen bonding in molecules with donor and acceptor groups. Solvatochromic and thermochromic evidence in n-(nitrophenyl)alkylenediamines