Fix problems with LayoutMerger between v7 and v8

* Write tests for various LayoutMerger problems and add
  two more safe attributes
* Pull out LayoutKeyUtils and other refactoring
* Propagate param and label attribute suffixes

Change-Id: Ic0fd3208c4751edc7ae010e1722e83ce6e78bea4