Changes to avoid crashing

The script would die and crash HexChat when joining a channel that has
no current tab (or focus).

- Removed channel checking in `generic_mode_change`
- Add a way to pass context to `set_prefix`