CBQE-2336:: change logic for compaction when adding tasks

Change-Id: I57e6b388eeebc1f61b751de7deb4076bc852acc3
Reviewed-on: http://review.couchbase.org/39678
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Andrei Baranouski <andrei.baranouski@gmail.com>