[ale] sync sinks when application terminates.

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