Added repair step for legacy storages
Fix unit test messing up the transaction on Oracle

Since the unit test is skipped anyway for Oracle, the dropTable() call
should be skipped as well to avoid having a leftover transaction and
cause further transactions to be nested and break the next test suites
requiring transactions.
Explicily close the statement cursors

Fixes the issue that makes SQLite freeze on later tests.
no statement caching for Oracle
Merge pull request #7539 from owncloud/repair-legacystorageid

Added repair script to upgrade the legacy home storage ids