Refactor widget data structures

A temporary refactor of widget data structures to avoid using globals,
along with better organization of widget-specific functionality. The threads
are now being started after the correct signal ('window-object-cleared').
Widget threads are named for debugging.

Some of these changes will be replaced later when JavaScriptCore objects
have been implemented.