Atomic underlayer formation during the reaction of Ti{0001} with nitrogen