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
I don't think the `waitFor` pattern should be exposed in all of the tests. Instead, the `waitFor` can be moved to the util function and we create the following pattern inside of the tests:

```
userUtil().createUsers(3, function(users, user1, user2, user3) {
   // Tests go here
});
```

This is very similar to the `createUsers` util function in Hilary