Introduce synchronisation around transport recovery

When handling network failure, bunny does not synchronise when modifying
the transport. This ends up in a producer on another thread sending data
to a closed channel.