[#1110] Proper handling of non-existing/expired sessions.

Problem description
===============

`_get_session` method throws `KeyError` exception when the request contains session information but the session id is not valid.

Changes description
===============

Catch `KeyError` exceptions and return `None` when the session ID present in the request header is not valid.

Added unit tests for the method.

How to try and test the changes
========================

Check that all tests pass.

reviewers @adiroiban