context refactoring. optimize tenants and their resources in context

Change-Id: I1a60b5c86597411e88b9f2c7135297f850c36795