Explicitly bound the duration of each diag_handler_worker work.

Otherwise a work that got stuck, would prevent subsequent attempts to
grab diag from ever succeeding. In addition, I restructured the code
so that partial diags could be collected. In this way if something
gets stuck, it's likely that we'll at least be able to grab processes'
snapshot to investigate the issue.

Change-Id: I2542f80197b18d0f9e9f180dc42c6402b264f932
Reviewed-on: http://review.couchbase.org/33022
Tested-by: Aliaksey Artamonau <aliaksiej.artamonau@gmail.com>
Reviewed-by: Artem Stemkovski <artem@couchbase.com>
Tested-by: Artem Stemkovski <artem@couchbase.com>