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
Our util functions should follow the main UI API a little bit more. The signatures should be roughly as following:

**admin.js**

```
var createTenant = function(tenantAlias, displayName, host, callback) { ...; return callback(err, tenant); };
```

**authentication.js**

```
var login = function(username, password, callback) { ...; return callback(err, user); }
var logout = function(callback) { ...; return callback(err); }
```

**config.js**

```
var getValue = function(tenantAlias, module, feature, element, callback) { ...; return callback(err, value); }
var updateConfig = function(tenantAlias, configUpdate, callback) { ...; return callback(err); };
```

**content.js**

```
var createLink = function(displayName, [description], [visibility], link, [managers], [viewers], callback) { ...; return callback(err, link); }
var createFile = function(displayName, [description], [visibility], file, [managers], [viewers], callback) { ...; return callback(err, file); }
var createCollabDoc = function(displayName, [description], [visibility], [managers], [viewers], callback) { ...; return callback(err, collabDoc); }
var updateContent = function(contentId, params, callback) { ...; return callback(err, updatedContent); }
var uploadNewVersion = function($contentId, file, callback) { ...; return callback(err, updatedContent); }
```

**discussion.js**

```
var createDiscussion = function(displayName, [description], [visibility], [managers], [members], callback) { ...; return callback(err, discussion); }
var updateDiscussion = function(discussionId, params, callback) { ...; return callback(err, updatedDiscussion); }
```

**group.js**

```
var createGroup = function (displayName, [description], [visibility], [joinable], [managers], [members], callback) { ...; return callback(err, group); }
var updateGroup = function (groupId, profileFields, callback) { ...; return callback(err, updatedGroup); }
```

**user.js**

```
var createUser = function(username, password, displayName, additionalOptions, callback) { ...; return callback(err, user); }
var createUsers = function(total, callback) { ...; return callback(users, user1, user2, etc.); }
```

**util.js**

```
var generateId = function() { return id; }     (Re-use the util API function)
```