[Platform] Add memoryNetworks field to each memory

We want to be able to find memory's neighbours without resorting to a global
network list/map/etc. Hence we add a field "memoryNetworks" to each memory
node. We store it as a TVar because it is easier for initialization and because
we want to support dynamic changes to network configuration such as a disk that
is plugged, a node that crashes, etc.