Improvements to log message formatting

Use fromString and <> to make composing log messages much less ugly.

Also replace the derived Show instances for InternalKey and ForeignKey
with manual implementations using internalKeyValue and foreignKeyValue
to provide more complete information.