MB-100: save crash log atomically

My initial thinking was to avoid fsync at expense of potentially
losing this information (which can be lost anyways due to
non-durability of our various logs including ns_log).

But given I've seen how it can really easily cause empty file I've
changed my mind. So we're doing save-to-temp-then-sync-then-rename
procedure.

Change-Id: I24a44a117c469d90b8240bf20fecc05ce4610084
Reviewed-on: http://review.couchbase.org/25531
Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
MB-100: batch all outstanding crashes before saving them

I.e. if we have sudden herd of crashes, old could would save it one by
one. Potentially not coping with incoming crashes traffic.

New code implements simple trick of postponing actual saving until all
currently enqueued messages are processed.

Change-Id: I5ef4408ece05f75bb05416b160eab8dda38b40e6
Reviewed-on: http://review.couchbase.org/25532
Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>