implemented win_alloc callback for when the window is destroyed

allows the plugin the chance to clean up any resources associated
with that window (e.g. derived windows).