[lib] Close tunnelbroker socket when app is in background
Summary:
This diff closes tunnelbroker socket when app goes to background in order to prevent messages from decrypting twice and weird socket state.
Test Plan:
- Run the app
- Put the app in the background
- Send some DMs to the app
- Bring the app to the foreground
- Observe in logs that the socket is closed after going to the background and verify that no message is received before closing the socket
Reviewers: tomek, kamil
Reviewed By: kamil
Subscribers: ashoat
Differential Revision: https://phab.comm.dev/D13787