Allow widgets to be constructed from Javascript

Also fixes a bug in the comm manager.
I would call this something more specific than target_name in the comm_open message, since it will now have content.target_name and content.data.target_name. How about `widget_class`?