Refactor: python: Improve maintenancemode.py.
- Disable pylint warnings we can't really do anything about.
- Simplify how the pats lists are built.
- Get rid of interval. This is only used in one place in the bottom of the file.
- Get rid of the max attribute. It is unused.
- Rename the rid attribute to _rid. It is used all over the place, but only ever within this class. Likewise, rename action to _action.
- Rename all methods to be private and follow python naming conventions. Rename various parameters and variables to do the same.
- _toggle_maintenance_mode should take a boolean for what to do instead of a string.
- Get rid of unnecessary elif statements.
- Use += where possible.
- Fix comparisons to use "not" where possible.