Importance of 1n,.pi.* states in N-heterocycles. Internal conversion, intersystem crossing, and isomerization in azastilbenes