Rewire the migration to ignore orphan DB objects

Legacy databases can contain orphan creds and services.
AddCredsCounterCache iterates through all creds, finding their
associated services, and the host associated with that service.
host.creds.count is then called to set the counter cache. Orphan
objects in the DB can cause the chain to call :host on a nil
service or :creds on a nil host.

This artifact showed up in an older install of framework which
was behind on updates. Not a common event, but should be handled
without forcing the user to delete what may be useful information.