DOC: Improving code quality of doc/make.py, PEP-8 and refactoring (#19631)
- [X] closes #19631
closes #15591 
closes #10340 
- [ ] tests added / passed
- [X] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry

Summary of the PR:
- doc/make.py in lint and respects PEP-8
- Making the structure of the code more organized
- Added command line arguments for the number of sphinx jobs (#15591), for the PYTHONPATH (#10340)
- Should work in both Python 2 and 3
- Tracebacks are returned if a command fails (before just the output from the command was shown, but no traceback on where the exception happened).
