MB-9451: deallocate memory sooner while sending diags

We're now doing parts of pretty-printing work in separate short-lived
processes. The idea is that when those processes die, their memory is
released immediately.

Change-Id: I63dd276bae10f26661011dc748a8b04095b887cf
Reviewed-on: http://review.couchbase.org/31694
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Reviewed-by: Aliaksey Artamonau <aliaksiej.artamonau@gmail.com>