change varuint API to use ByteBuffers
fix off-by-one errors in significand encoding and xor logic.
varint can write xored values
int and real encoding now passes