save/restore selection functionality. fixes for rangy issues on iframes.

Few fixes for some of the todos you had written in here on rangy and html regions. Right now it doesn't work on shadow dom ( needs "window" ) but I added a few comments and TODOS. In the iframe interface it works as expected. 

I need to figure out the best way to test selections like this, maybe mock it somehow?