Bug 829419 - Don't allow processing pending events while shutting down cache IO thread, r=jduell