added OC_DB::isError and logging
fixed error rising from fetchRow
added check by numRows()
changed to public api where it was possible
reformat code to comply with the coding guidelines
Merge branch 'master' into file_encryption_util_is_error

Conflicts:
	apps/files_encryption/lib/util.php
Merge pull request #3495 from owncloud/file_encryption_util_is_error

added OC_DB::isError and logging for #3486