Immediate widget comm

(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.