JCBC-323: Make flush() shutdown-aware.

This changeset makes sure that when flush() is called, it properly
checks that we are up and running and not shutDown.

It also exposes the shutDown variable to all other package-private
members.

Change-Id: Id8fcd379c260ef6586d4a73b97dbf540b33a1372
Reviewed-on: http://review.couchbase.org/27216
Reviewed-by: Matt Ingenthron <matt@couchbase.com>
Tested-by: Michael Nitschinger <michael.nitschinger@couchbase.com>