Fix cleanup issue

The weak pointer class sets Context to NULL before the texture resources
are cleaned up.  The destructor for RenWin call ReleaseGraphcisResources.
Modify TextureObject to have ReleaseGraphicsResources method that gets
passed a window so it can work from the destructor.

Change-Id: If66d00268f6d7d6f2a105ef534138e0fe7fd7f57
Merge topic 'fix_cleanup_issue' into master

7129b4f6 Fix cleanup issue