Add new ManagedEGLContext class to help apps participate in memory trimming.

This class provides an API for an application to know when it is time to
destroy its EGL context when memory is being trimmed.  By having this in
the framework, we can still detect whether it will be useful to destroy
any EGL contexts (because we know if doing so will destroy all of them).

Change-Id: I1eac8d640052778052926b875c7928008f752182
4 files changed