Fixes leaks in certain cases

- Mark a connection as dead if the request ended or the cancellation token is tripped.
- Always end the request when ending the connection.
- Dispose the CT registration after setting the tcs result.