Added endian.h and fleshed out msg.[h,c]

endian.h has all the byte-swapping routines.  Most platforms have some variant
of these (e.g. htonl), but the uint64 functions are non-standard.  For
portability, I just copied (the most inefficient but cross-platform) versions
of these functions from /usr/include/endian.h an /usr/include/bits/byteswap.h.

msg.h and msg.c are very simple.  I still need to implement a msg iterator.

example.c now has a function that runs throw some of the nxn_msg_* functions.