Changed NULLs to 0s, reversed XLog levels order, and added documentation.

NULL isn't a keyword in UNIX C++ so it is changed to 0 in relevant
areas. Higher priority levels (e.g. XLOG_ERROR) now have a higher
integer associated with them. Added some documentation in header files.