Fix #486: should delete Shell object on native window destruction

Or the platform events will be sent, and then deleted Shell object
is referred.