handle application lifecycle events

- Disconnect on backgrounding and dismiss torrent list.
- On active, resume Bonjour activities.