Refactoring open session query function calls and renaming TEE_ -> tee_

Change-Id: Idc3c7a2d4f05b5f584c21f5c1d5d987ec6b182ee
Signed-off-by: TanelDettenborn <tanel.dettenborn@intel.com>