[+DH] Allow partial CSV imports, avoiding long running transaction

Successful rows will be added to the database. Failed rows will not be recorded. We run each row in its own transaction, rather than using a single long-running transaction. The long-running transaction has a high chance of causing deadlocks in production.
Add test that exceptions during row import cause rollback

This particular scenario was not covered by any other tests.
Remove unused return values from #import_row
[+DH] Provide split CSV downloads after imports.

- All rows
- Successful rows
- Failed rows

Includes tidy-up of interface.
[+DH] Remove unused "already imported" import stat.
[+DH] Only send first line of import errors in CSV.

Database still holds the full stacktrace.