CBQE-2200 consolidate delay time in rest api with function call
to detect the delay shutdown of couchbase server and when it is up again

Change-Id: I023bdbf4ccf1cf911d81c3305a81a2a6f9553708
Reviewed-on: http://review.couchbase.org/35985
Reviewed-by: Ketaki Gangal <ketakigangal@gmail.com>
Tested-by: buildbot <build@couchbase.com>