Revert "Improved layout serialization: added documents support. Added layout items state serialization."

This reverts commit bae34017fea2e5687d49b686ad93079e793e507f.
Redone my previous commit without whitespace changes in modified files.

Improved layout serialization: added documents support. Added layout
items state serialization.