OC6: Implement Doctrine as the backend for OC_DB

In combination with doctrine-object (see #2220) this converts the database connection to a Doctrine implementation. The PR is split in 2 to help the review process.

Note: this needs owncloud/3rdparty#17

@icewind1991 @Raydiation @DeepDiver1975 @butonic