OF-2085: Pubsub - bring flush implementation in line with convention
This reworks the fix for OF-2085, by re-using the same code pattern used elsewhere: first flush nodes, then check if items need to be flushed.
OF-2085: Rename flush method to better reflect its functionality
The 'flush' doesn't only flush items, but all changes. This rename reflects that.
As this API was introduced in 4.6.0 (which this commit is also going to be part of), there should not be a need to retain a deprecated version of the old method name.
OF-2085: Pubsub - do not skip cache flushes when no items are changed
Requiring a pubsub item modification to go forward with a cache-to-database flush delays or prevents other changes (eg: creation of empty new node) to be persisted. Instead, any cached node action should cause a flush to proceed.