Proper decimal encode/decode

Various encoding bug fixes.
Adds additional tests for varint and decimal.
Convert null collections
Fix: arrity