decode: better error messages on bad literals
decode: better error messages for bad objects
decode: single definition of consume_value/1