Throughput optimal distributed routing in dynamical flow networks