generate copy of sqlite database file in data directory

fixes https://github.com/owncloud/core/issues/9826

@icewind1991 @bantu @schiesbn @butonic please review

@karlitschek @craigpg setting 7.0.1