Support varlen encoding for arbitrary int and uint numbers

This superseded #311 and fully implements efficient varlen encoding for both signed and unsigned integers in bytecode.