Fix termination of DebugFCPClient:
- Shut it down AFTER everything which can modify the database is down
- Make sure to deploy pending notifications.