core: move NTOHL and friends into byteorder.h

You call it weird, I call it readable. :)