merge_tree: several fixes
merge_tree: several fixes

* fix closing open read streams
* fix closing order, let writes finish
* ensure only one local write stream

Netsend/PerspectiveDB,Netsend/persdb,Netsend/persdb,Netsend/PerspectiveDB,Netsend/PerspectiveDB,Netsend/persdb