Fully separated layout and structure layers.

Added _common.C and _common.h files for code that is common to the two layers within each widget.

Currently the layout engine has been debugged to the point where it correctly produces output for examples 1, 2 and 3.