Add a few sanity checks.
Move xson_token_t internals into reader.c