Fix the py27 failure because of "ephemeral_key_uuid" error

Change-Id: Ic520a1657106a10a595240f84455eec1b79c2de0
Refactored session access

Encapsulated all access to sqlalchemy.get_session
This is needed for further refactoring of session handling

Change-Id: I35c64b69c7bde80713ca1f0e7f7f83bd57493668
Merge "Refactored session access"