Redone my previous commit without whitespace changes in modified files.

Improved layout serialization: added documents support. Added layout
items state serialization.
Fixed code editor creation policy.
Add IModule.DefaultDocuments

Fixes problem with selection, which occurs when a module opens documents
during initialization, as well as documents being opened from saved
state.