Fixed SceneGadget GL resource management.

We can only destroy resources on the main thread when the GL context is current. This isn't elegant, and joins a host of other inelegant code in IECoreGL already. Ideally I think we need to introduce an IECoreGL::GLContext class, and have the IECoreGL resources belong to a specific context, which can be in charge of the deferred destruction.