Supports BigEndian for varint.

Makes the library compatible with BitMessage too: see www.bitmessage.org.