channeldb: avoid locking the graph cache while iterating channels
channeldb: avoid locking the graph cache while iterating channels

It may happen that we do pathfinding while also attempt to change the
graph. In this case changing the database, channel state, graph while
reading from the same sources may create deadlocks. To resolve this we
change locking policy in the graph cache when pathfinding.

aakselrod/lnd,aakselrod/lnd