Autoionization and ultrafast relaxation dynamics of highly excited states in N2