Fixing varint and decimal encoding/decoding

Found several numbers which were encoding/decoding incorrectly. The issue was in append_varint.

Example: 
`append_varint(1042342234234); read_varint` returns `-57169393542`

Also made a small change to read_decimal which would occasionally fail to decode decimals between -1 and 0. 

Example: 
`append_decimal(-0.031108612692221094); read_decimal` returns `0.0`