Adds varIntToNum conversion function

As suggested in #94, this pull request adds `varIntToNum` as a conversion function.

This also provides the test case that was suggested in #94 to ensure the right number of bytes are used for each int size.