Fixed failing Selenium tests.
Added the pg gem.

[#78038926]
Added active_record configuration.

[#78038926]
Added a model to represent metrics for a single visit.

[#78038926]
Added the database_cleaner gem.
MetricsLogger now uses VisitMetricsEntry.
Removed no longer used pieces, changed templates, adjusted CalculatedMetrics.
Added a migrator.
Removed no longer used tests.