Performs a graceful shutdown of this instance.
- {@link #flush Flushes} all buffered edits.
- Completes all outstanding requests.
- Terminates all connections.
- Releases all other resources.
Not calling this method before losing the last reference to this instance may result in data loss and other unwanted side effects
@return A {@link Deferred}, whose callback chain will be invoked once all of the above have been done. If this callback chain doesn't fail, then the clean shutdown will be successful, and all the data will be safe on the HBase side (provided that you use
durable edits). In case of a failure (the "errback" is invoked) you may want to retry the shutdown to avoid losing data, depending on the nature of the failure. TODO(tsuna): Document possible / common failure scenarios.