Strip widgets from sidebars_widgets[] settings if not registered

A widget added to a sidebar leaves its widget_id in the sidebar even
when the widget goes away, for example due to a plugin deactivation.
Now any such widget remants will get filtered out when sent to the
client.

Without this fix, a JavaScript error would be thrown:

> Uncaught TypeError: Cannot read property 'transport' of undefined