Fixed JIRA https://wso2.org/jira/browse/STORE-518

Removed deprecated function getCurrentContext() and added getThreadLocalCarbonContext()