Gracefully close Tribler

Gracefully close Tribler on exit (probably with a shutdown xmlrpc call). Timeout for result, then shutdown the app.