Add some lifecycle safety
Merge pull request #416 from tommycli/master

Address some lifecycle issues with LwjglAWTCanvas