OAK-593: Segment-based MK

Make the FileStore.flush() method public in case it's needed for transactional safety.
Adjust the way the background thread is synchronized to avoid the potential deadlock scenario.

git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/oak/trunk@1548074 13f79535-47bb-0310-9956-ffa450edef68