Bug 830975, make sure to flush all the documents, yet keep the no-flush-needed case fast, r=mccr8,f=bz,a=lsblakk

--HG--
extra : rebase_source : 1afc250ecf3e02d5e9e282d7b789db6317b70837