core: move NTOHL and friends into byteorder.h

Maybe, but that's not part of this PR.