core: move NTOHL and friends into byteorder.h

Wasn't there a problem in C++ with this kind of notation?