Moving memory functions to own file

Change-Id: Ie42323962aeeb6e3149119fd50285256846aaab4
Signed-off-by: TanelDettenborn <tanel.dettenborn@gmail.com>
Libtee initialize and finalize context functions

Change-Id: I4f88025680d36d65e73210f311527df69abd433d
Signed-off-by: TanelDettenborn <tanel.dettenborn@gmail.com>