eliminate OC_Template::printErrorPage in database classes, fixes #12182

as discussed. I replaced all occurences in lib/private/db. 

@MorrisJobke @DeepDiver1975 @LukasReschke 
no, generic \Exception will end up in 500, HintException in 503, see https://github.com/owncloud/core/blob/master/index.php#L37.  Actually, we should get rid of the header() here as well in that case.