Make the layout format robust against elements without (unique) ids.

This uses the same tree structure and child order for the layouting file
than the state machine has itself. This way we can also identify elements
that do not have an id set.

Change-Id: Ife1965b125a61b479712dbd8e2d1e87195975737
Reviewed-on: https://codereview.kdab.com/10883
Reviewed-by: Continuous Integration <build@kdab.com>
Reviewed-by: Kevin Funk <kevin.funk@kdab.com>