Various pattern corrections
Workaround for problem with creation of .out files - now they are created prior to .diff so when the latter fails we still have .out
Small corrections in some patterns (including removal of dangling spaces of unknown origin)
All new tests in database_api marked as failing - patterns need to be corrected first.