Sequential and Distributed Algorithms for the All Pairs Quickest Path Problem