port database layer from appframework to core
fix scrutinizer issues
fix doc strings for db facade
remove unusued variable
remove unusued variable
move db into iservercontainer
remove useless import
Fix typo & add type
fix phpdoc for entities
dont update entity and dont run an update query if an entity wasnt changed at all
Make db connection protected
Merge pull request #8274 from owncloud/appframework-db

Port database layer from appframework to core