Fixed NbtReader defaulting to little-endian encoding.
Added unit tests for NbtSerializer and fixed a couple serialization bugs that were caught by the tests.