Fix NullPointerException: the JNI method __store_get may fail and return NULL

The mesos JAVA API will call driver->abort() if any scheduler callback throws
any exception, this will bring chronos into *deactivated* state and will not
receive any offer from mesos, so as can not start any job (task exactly) any
longer.

The exception ever happened is NullPointerException throwed by persistData().

Bug: https://github.com/airbnb/chronos/issues/263

Signed-off-by: Chengwei Yang <yangchengwei@qiyi.com>
Ensure zookeeper node exist to avoid throw Exception at startup

If the $zk_path/state node isn't exist, mostly at first time startup or has no
job submitted, chronos will throw an exception at start up when loading
jobs/tasks.

Signed-off-by: Chengwei Yang <yangchengwei@qiyi.com>
Remove unused zooKeeperLeaderPath

We in fact use zooKeeperCandidatePath as leader path, so remove this one which
never be used and will be used.

Signed-off-by: Chengwei Yang <yangchengwei@qiyi.com>
Catch Exception instead of Throwable

Throwable has two subclasses Error and Exception and as JAVA document says:

  An Error is a subclass of Throwable that indicates serious problems that a
  reasonable application should not try to catch.

So do not catch Error here.

Bug: https://github.com/airbnb/chronos/issues/124

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

Fix NullPointerException, Exception at startup, catch Exception instead of Throwable