tor-chanmgr: refactored to remove `with_channels` and added `PendingChannelHandle`
The goal is to add a PendingChannelHandle
that ensures that a pending channel entry is always removed. This fixes the first part of #1654. But before we do this, we need to refactor AbstractChanMgr
and MgrState
a bit so that MgrState
s methods can't cause a deadlock. This requires removing the MgrState::with_channels{,_and_params}
methods, and moving the channel map logic into MgrState
. I think splitting it this way is nicer anyways.