Support for custom types via function

Adding support for custom value types emitting their value via a function. This seemed the easiest path to supporting things like MySQL Spatial extension types (in my case I need POINT) or other custom data types.