server: fix crash when merging folders without meta data
server: fix crashes when unmounting a store with open handles
server: add test suite for synchronization