Allow model id to be set externally on creation of the widget. 

(This depends on PR #6151. It is 2 commits ahead. )

With this change, the `model_id` of a widget to be set externally when creating the widget. Another feature is that if the comm of a widget is closed and reopened, the new model_id/comm_id will be the same as the previous one. 

It is especially useful in cases where you want the `model_id` to correspond to some other object's uuid. 
Should I check if there is already a comm with that id and raise an exception if it is the case? Or should I consider that people are responsible when externally setting model ids?