Fixes #6065: Log display no longer emits deprecation warnings and uses fewer queries

This passes the already-loaded log entry rows directly to the object fetcher (saving 1 query/row), and uses various loading techniques based on the type of object.

The bad news is this loading logic can become out-of-date as core changes, but I can't see a way around it, and at the worst we'll get deprecation warnings again telling us to update it.