[sqltypes] Add support to serialize and deserialize them

Also got rid of half complete MarshalJSON implementation.