add support for document change

Fix one of the still not working items:  Switching files in Brackets opens a new tab (and old tab is no longer connected, but there's no visible indication to the user).
It now allows switching between HTML files in the Editor which makes livedev session be restarted with the new live document without opening a new browser/tab instance.
This comment was copied from previous function and needs to be updated.