Cache value casters in static member variable.

This optimization is mostly useful since connection parameters can be
instantiated more than one time in a script when using clustering or
replication.