In the update_primary_key plugin, if the primary key column changes, clear related associations

This is similar behavior given by the association_autoreloading
plugin.  The implementation is a little less optimized, but as
the update_primary_key plugin causes a significant slowdown
anyway, this probably won't be a big deal.
Speed up fetching model instances when using update_primary_key plugin

This refactors the plugin so that instead of caching the pk_hash
on fetch, it lazily caches it only if the value changes.  This
should significantly speed up fetches.  With the previous commit
to clear associations when the primary key changes, this was
trivial to add.
Add Database#register_array_type to the pg_array extension, for registering database-specific array types

This makes it possible to register array types without modifying
global state.
remove extra slash from require path
Expand Database#register_array_type to automatically determine oids

If the oids are not provided, then try to determine them using the
pg_type system table.  This makes it very simple to add array types
for any supported scalar type.  Best case scenario, only the
:scalar_typecast method needs to be provided as a separate option.
Merge remote-tracking branch 'bporterfield/remove_extra_slash_in_require'
Fix typos in pg_array RDoc