Update app.py

Dispatch 'on_stop' and clear window widgets when manually calling App.stop()
Merge pull request #1113 from smishlayev/patch-4

Update app.py