Replace the clunky direct transaction SQL

* With ActiveRecord semantic equivalent
Use COPY FROM STDIN for hits import

* Does not require superuser
* Is surprisingly faster. For UKTI import (average of 8 runs, 10 taken,
  lowest and highest timings discarded):
   * 17.9s  when copying whole file in one buffer (File.open(...).read,
              this commit)
   * 18.26s for line-by-line (File.open(...).each, not committed)
   * 21.3s  for older, file-based approach
* ANALYZE removed after hits_staging COPY. Was not adding anything and was a
  cargo-cult leftover.
Merge pull request #378 from alphagov/postgres-stdin-copy

Postgres COPY ... FROM STDIN