fallbackswitch: fix and prevent deadlocks
I'm trying to drain fallbackswitch
's mutexes swamp.
- ensure strict ordering when taking mutexes
- prevent deadlocks in chain function
- implement the stream lock protection suggested in #202 (comment 1387170)
Edited by Guillaume Desmottes