pg, inline casting methods into `OID::Type` objects.

This inlines casting for the most obvious types. The rest will
follow eventually. I need to put some tests in place, to make sure
that the inlining is not causing regressions.

/cc @sgrif