Fix race in warmup completion

This change fixes a race in warmup completion that is cause when
a warmup thread is finishing and another thread tries to stop
warmup. This behavior can cause two stats snapshot tasks to be
scheduled and since we only keep a task id for one of the warmup
tasks it is impossible to cancel the second one that was scheduled.

This cahnge also refactors the warmupCompletion variable so that
it can be kept in the warmup class.

Change-Id: If01929dfe35c03f12e466f3099298339c9a66960
Reviewed-on: http://review.couchbase.org/30126
Reviewed-by: Michael Wiederhold <mike@couchbase.com>
Tested-by: Michael Wiederhold <mike@couchbase.com>