A javascript implement varint encode/decode