Backport #2567
Merge pull request #3076 from owncloud/manually_backport_insertIfNotExist

Backport #2567 OC_DB:insertIfNotExist()