MB-10027 reduce ExecutorPool mutex calls in doneWork

It is sufficient for the doneWork routine to call the
ExecutorPool mutex just once after it is done with a task type

This reduces the lock contention and decreases cpu usage as
per code profiling

Change-Id: I024f3180d67270cb03f2382de5165af329da47e4
Reviewed-on: http://review.couchbase.org/35743
Reviewed-by: Chiyoung Seo <chiyoung@couchbase.com>
Tested-by: Sundararaman Sridharan <sundar@couchbase.com>