Fix pdo statement wrapper numrows on modification

This PR supersedes https://github.com/owncloud/core/pull/3780 by implementing the result/numrows behaviour as found in MDB2 and doctrine. Executing a SELECT statement returns a result object as usual. Executing an INSERT, UPDATE or  DELETE statement returns the number of affected rows.

For this to work the MDB2 connection needs to be told the type of query when preparing a statement. The PDO statment wrapper needs to be told the type of query to choose the correct return type.

The type of statement will be guessed by inspecting the first 10 characters of the statement. This works for all current statements in ownCloud. Should it become necessary to override this guess the type of statement can be toggled by specyfying the new fourth parameter of `OC_DB::prepare( $query , $limit = null, $offset = null, $isManipulation = null)`

Tested on sqlite and mysql, oracle still has problems, but they I'll solve them in a different PR. First let's see what CI has to say about it.

@blizzz touched your user_ldap, please review
@schiesbn touched files_encryption (to supersede https://github.com/owncloud/core/pull/3780), please review
@tanghus touched vcategories, please review
@DeepDiver1975 touched the testsuite, please review
@MTGap @icewind1991 @bartv2 @karlitschek touched the db core pdo wrapper, pls have look
someone have a look at the sabre dav locking that this touches, maybe @jakobsack