Fix AndroidApplication stop functionality

Mostly by adding timeouts and making sure listeners quit with the
proxyserver.