XD-1270: Add states to the deployment of stream

Summary of changes:

1. `ModuleDeploymentWriter` now returns `ModuleDeploymentStatus` which encapsulates everything related to individual module state.
2. The `ModuleDeploymentStatus` objects are aggregated and passed into an implementation of new interface `DeploymentUnitStateCalculator` which calculates the state of the job/stream based on the individual module states.
3. Interface `DeploymentUnit` was introduced to cover the common attributes for streams and jobs.
4. The status for streams/jobs is written into ZK under `/xd/deployments/streams/<name>/status` and `/xd/deployments/jobs/<name>/status`, respectively.
5. As a result, modules for streams and jobs are now under `/xd/deployments/streams/<name>/modules` and `/xd/deployments/jobs/<name>/modules`, respectively.
6. The stream and job repositories have a new method `getDeploymentStatus` which may be invoked to obtain the state of a stream/job.
7. Stream and job states are recalculated when a container joins or leaves the cluster.
This is the one place where the enum was being used. Changed it to this:

```
/**
 * Block until all:
 * <ul>
 *     <li>All pending requests have been responded to.</li>
 *     <li>A timeout occurs; in this case a collection of
 *     {@link ModuleDeploymentStatus}
 *     is returned. These results can be examined to see which container(s)
 *     timed out.</li>
 *     <li>The thread invoking this method is interrupted.</li>
 * </ul>
 *
 * @return collection of results
 * @throws InterruptedException
 */
public synchronized Collection<ModuleDeploymentStatus> getResults() throws InterruptedException {
	long now = System.currentTimeMillis();
	long expiryTime = now + timeout;
	while (pending.size() > 0 && now < expiryTime) {
		wait(expiryTime - now);
		now = System.currentTimeMillis();
	}

	// if there are any module descriptors in the pending set,
	// this means the ZooKeeper node for that module deployment
	// was never updated
	for (ContainerModuleKey key : pending) {
		results.put(key,
				new ModuleDeploymentStatus(key.container, key.moduleDescriptorKey,
						ModuleDeploymentStatus.State.failed,
						String.format("Deployment of module '%s' to container '%s' timed out after %d ms",
								key.moduleDescriptorKey, key.container, timeout)));
	}
	return results.values();
}
```