Test data types and properly support varints

I was considering to move this to its own npm module, as it might be useful to other users of Java's Bignum varint serialization as well. I have some tests locally. Opened #32 for this.