refactor polymorphic test example so it's reusable

Specifically, the test setup wouldn’t remove deleted records from the
cache after teardown. The `Remembered` cache isn’t needed outside of
test setup, so we might as well use a local variable.
add a test for deeply nested polymorphic associations