Refactor UI test APIs

Refactored the UI test APIs:

- The UI APIs are used for creating users/groups/collabdocs/...
- Any JavaScript errors in the UI will be logged by CasperJS now, potentially giving more information about failing tests
- Exchange of information between UI and CasperJS happening through events
- More robust waiting for resources to get created
We shouldn't be doing separate `Open with assertions` and `Open without assertions` functions as it repeats a lot of code. We should just have one function that includes the asserts. Whilst that will increase our total assert count, I don't think that's a problem. It's a meaningless number anyway. We should really be counting the number of tests or total code coverage.