Bug 1079748 - Implement hierarchy manager

this will probably end up being intermittent. as a rule of thumb we should never wait for a duration in those tests.
here's an extract from my un-finished work on bug 1088166. You can inline it for now and I'll extract it properly in a helper for the bug.
```
      this.client.executeAsyncScript(function() {
        var win = window.wrappedJSObject;
        win.addEventListener('cardviewshown', function wait() {
          win.removeEventListener('cardviewshown', wait);
          marionetteScriptFinished();
        });
        win.dispatchEvent(new CustomEvent('taskmanagershow'));
      });
```