Fix success limited-repeatitions job status

Currently, limited-repeatitions job status doesn't show correctly when
it has success-ed.

For example, if the job has repeatition 1, once the job finished, then
the job status says "job has not run yet" and the success time and times
are still empty and 0, however, only "job has been disabled" shows
correctly.

Signed-off-by: Chengwei Yang <yangchengwei@qiyi.com>
Fix asynchronous job

There is another required field in mesos protocbuf message TaskStatus,
without this fix, it will throw an exception when building the protocbuf
message like below:

com.google.protobuf.UninitializedMessageException: Message missing required fields: state
        at com.google.protobuf.AbstractMessage$Builder.newUninitializedMessageException(AbstractMessage.java:605)
        at org.apache.mesos.Protos$TaskStatus$Builder.build(Protos.java:18993)
        at com.airbnb.scheduler.api.TaskManagementResource.updateStatus(TaskManagementResource.scala:48)

For the protocbuf message definination, see mesos code:
  include/mesos/mesos.proto

Signed-off-by: Chengwei Yang <yangchengwei@qiyi.com>
Fix coding style

Signed-off-by: Chengwei Yang <yangchengwei@qiyi.com>
Fix job serialization

Signed-off-by: Chengwei Yang <yangchengwei@qiyi.com>
Merge pull request #248 from chengweiv5/master

Fix limited-repeatitions job, asynchronous job and job serialization
Mesos 0.20 docker integration throws UninitializedMessageException
Support easy submission of immediate job from REST API

This is a nice feature for job submission go through the REST API
because if a job want to schedule now, it has first to know what's the
time the chronos server is, and give the job a schedule time within
epsilon window. This is a problem when submitting a job from web ui,
because the schedule time by default is current time. So it's cool if
we can do that through REST API.

With this patch, one job can be a immediate job by any of below ways:
  * without "schedule" field
  * with empty start time in "schedule" field, e.g. "R1//PT24H"

Change-Id: I36e5b2996048b3166c90b240fb2d682da8f34d76
Signed-off-by: Chengwei Yang <yangchengwei@qiyi.com>
Fix job deserialization: Load errorsSinceLastSuccess property of job

Change-Id: Ia9e8a99a3da0e91be34899d044a5c050a68cdf6d
Signed-off-by: Chengwei Yang <yangchengwei@qiyi.com>
Merge pull request #249 from cloudysunny14/addedDockerType

Mesos 0.20 docker integration throws UninitializedMessageException
Merge pull request #251 from chengweiv5/master

Fix job deserialization and submit immediate job through REST API
For ZK tests, add small delay.

These tests are flaky and tend to fail randomly, likely due to race
conditions in the ZK election.
Fix job's disabled status

There is a bug that failed job with zero recurrence may still not been
disabled.

Signed-off-by: Chengwei Yang <yangchengwei@qiyi.com>
Merge pull request #252 from chengweiv5/master

Fix job's disabled status
Implemented replacement web UI.

Added separate button to create new dependent job.

Removed edit/new job functionality from UI.

Dropped duplicate button.

Added enable/disable toggle button.

Conflicts:
	src/main/resources/assets/app/static/js/chronos_jquery.js
Fixed dependency path for enable/disable button.
correct use of Option