Make Varint#writeUnsignedVarInt(int) thread-safe

Although Varint#writeUnsignedVarInt(int) isn't used anywhere of importance (right now), this change makes it thread-safe (instead of using a static byte buffer) in case it does get used in a more prominent way in the future. This will prevent inadvertent introduction of thread-safety issues elsewhere.