web.py applications typically run in WSGI mode, but when used in embedded
environments, it may be more useful to run the application in stand-alone
server mode (a.k.a. 'app.run()').
Also, running the application via 'app.run()' in a different thread kills
the out-of-the-box behavior of stopping the application with Ctrl-C.
This patch adds the 'stop(self)' method to the application class, so that
applications running stand-alone can be stopped easily with 'app.stop()'.
Credits: llc at stackoverflow: http://stackoverflow.com/questions/5389111
Related to: #100