Caching NHibernate configuration

Provide a hook to support serializing the configuration to a file. Default implementation is to serialize/deserialize to a file.

Hopefully whitespace/line ending issues are sorted now.