- promoted exit_on_escape functionality to BaseWindow and implemented a
  callback for it
- PEP8 fixes
- expanded exit_on_escape callback to real function; added guard for when
  documentation is being built.
Merge pull request #1904 from aspidites/exit_on_escape

Exit on escape