[Review Only] Landing livedev2 in core 

@busykai, please review this PR instead of #2. I have excluded dependencies from NodeSocketTrasnportDomain when integrating livedev2 files which makes that commit able to be reviewed now. 

This is an initial review to prepare landing of livedev2 in Brackets core as per njx/brackets-livedev2#24
It seems like this function is excessive (as per this comment and how it's used in the code) -- `DocumentManager.getCurrentDocument` should be used directly instead.