Rename "$window" to "$global".

The name "$global" is much better because:
- it means really the global scope
- only browsers have a "window"
- node has "global"
- web workers have "self"