Auto-generate stable fixture UUIDs on PostgreSQL

Fixes #11524. This PR builds on that one by @ruckc:
* Does not require the `uuidtools` gem (or any other new dependencies)
* Supports polymorphic associations by inspecting the polymorphic foreign key type.
* Added tests.