MBS-6101, Guard session lookups with a `defined $c->sessionid` check.

Any get/set on the session store ($c->session) will create the session
if it doesn't exist, which then means that particular request can now
only be serviced if the session store is available.

But a get lookup ($c->session->{somekey}) will always fail if a new
session is created for it (the new session is obviously empty), so
guard it by first checking if there is an existing session (defined
$c->sessionid).
MBS-6101, guard c.session.tport appropriately (see previous commit).
MBS-6101: Refactor out `try_get_session`

This attempts to get something from the session, but only if a session is
already open.
Merge remote-tracking branch 'ocharles/mbs-6101' into mbs-6101

* ocharles/mbs-6101:
  MBS-6101: Refactor out `try_get_session`
MBS-6101, make Redis connection lazy.
Merge branch 'master' into mbs-6101

* master: (660 commits)
  MBH-153: don't let a failed signature kill the whole dump
  MBH-153: ocharles fix
  Schema 18: drop track indexes IF EXISTS, add --noupdate-replication-control to upgrade script
  schema 18: make sure config.sh is loaded
  MBH-153: update DBDefs.pm.sample
  MBH-153: copy signatures to backup dir/ftp
  MBH-153: don't put the signature for the private dump on FTP
  MBH-153: switch to using DBDefs for both encryption and signing keys
  MBS-6385: autocomplete searches for URL/MBID in some cases
  Use pushd/popd instead of "cd ..".
  Remove more debug code.
  Remove http://localhost download location from upgrade script.
  Download track table dump before start the upgrade, and verify track table dump download.
  Schema 18: don't miss the artist_credit.name FK
  Schema 18: vacuum analyze at end of script
  Schema 18: drop medium_cdtoc_fk_medium if exists, ensure artist-credit refcounts are plain integers, not bigints.
  Fix CDTOC FK in schema-17 migration.
  Schema 18: rename indexes unconditionally and ignoring errors, for imports done on schema 17 fullexports
  Schema 18: fix up the exclusion of replication_control in specific dumps
  Schema 18: remove warp's slow refcount fixing script
  ...

Conflicts:
	root/cdtoc/attach_artist_releases.tt
	root/cdtoc/attach_filter_release.tt
	root/release_group/index.tt
MBS-6101, verify that Redis->new() selects the specified database.
Merge branch 'beta' into mbs-6101

* beta: (104 commits)
  area, not label
  Fix rollup replication to work properly alongside GPG.
  Adding how tos to the menu
  Encode passwords as UTF-8 before bcrypt'ing
  MBS-6261, change remaining "Release Events" columns to seperate date/country columns.
  Revert "MBS-6261, do not render "date unknown" in date/country pairs with unknown dates."
  MBS-6261, do not render "date unknown" in date/country pairs with unknown dates.
  MBS-6261, rener release events in separate date and country columns in release list.
  MBS-6374, convert schema 16 style country/date pairs seeded to the release editor to schema 18 events.
  MBS-3427: actually validate CDStub submissions before trying to insert them
  MBS-6315, load recording associations from the recordings form, not the tracklist form.
  Add test for MBS-6073
  Update Twitter URL cleanup to use https
  MBS-6073: Inaccurate range of credits when grouped at the bottom of a release page
  Revert "Revert "MBS-6416, keep track of track row ids when editing a medium.""
  MBS-6416, Do not try to initialize Track->new with an empty string or undef as an identifier.
  Amazon images: SSL for ec4. images as well
  Revert "MBS-6416, keep track of track row ids when editing a medium."
  Don't break label search, they don't have begin areas.
  Ooops forgot one header :)
  ...

Conflicts:
	root/release_group/index.tt
Merge branch 'mbs-6101' into beta

* mbs-6101:
  MBS-6101, verify that Redis->new() selects the specified database.
  MBS-6101, make Redis connection lazy.
  MBS-6101: Refactor out `try_get_session`
  MBS-6101, guard c.session.tport appropriately (see previous commit).
  MBS-6101, Guard session lookups with a `defined $c->sessionid` check.