Generate class members in consistent order

- Temporarily brings back implicit context argument for `SPopupWindow`.
- Sort listener callbacks by name to prevent unnecessary diff between commits