Unraveling the formation mechanism of graphitic nitrogen-doping in thermally treated graphene with ammonia