replaced the c++ stream based in/out in db_format.cpp by a less ugly implementation; more memory efficient gz-writing; and using shlock/exlocks on the db files now