Prison metadata gets stored in the encrypted link (state).
Prison metadata is retrieved from the encrypted link or added when missing.
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.

[#78038926]
MetricsLogger now uses VisitMetricsEntry.

[#78038926]
Added a migrator.

[#78038926]
Removed no longer used pieces, changed templates, adjusted CalculatedMetrics.
Removed references to redis from the app, as we're no longer using it for caching.

[Finishes #78038926]
Attempt to fix a bug in logstasher.
Updated remote repository ref for logstasher.
Added missing weekly metrics.
Merge pull request #41 from ministryofjustice/postgres-78038926

This introduces Postgres as a backing store for metrics.
Fixed borked e-mail template.
Prevent an exception from being swallowed and not reported via Sentry.
Revert "Prison metadata is retrieved from the encrypted link or added when missing."

This reverts commit 7942d756163ae9b6de20ae9396545b54de689a88.
Revert "Prison metadata gets stored in the encrypted link (state)."

This reverts commit 09f9ad5c515213b16aaff9826d4e688aa251f317.
Remove prison structure saved in the session.
Limits name length to 30 bytes
Counts characters instead of bytes when limiting name length