Remove `editor` and `window` globals

They were a bad idea from the beginning, but it took some time to get
around to removing them.