Bug 724632 - Refactor page-mod to remove legacy APIs

This is change is based of following smaller changes #671, #677, #673, #672 so diff here will contains changes from them.

Note that this patch does not passes all the tests, yet that's because tabs, windows and other APIs depend on worker and requires updates. Never the less I think it would be a lot easier to review things individually so fixes for them will be coming in a separate pull requests.

This is rewrite of page-mod and passes following: `cfx test -f page-mod`