Allow widgets to be constructed from Javascript

Also fixes a bug in the comm manager.
create_model doesn't do anything other than call `_create_model`. Is there a reason for the two to be separate methods?