Bugfix - should have been looking for different key to the array.
Big commit of work in progress. This is the initial workings of the layout/block management module. Similar to the pages module, but without some of the features like meta, urls etc.

Still need to add the logic to remove blocks and block versions. Then need to add the ability to set default blocks for a layout and also link blocks to specific pages.