Make the LoggingPreferences implement Serializable.

Closes issue #6657.