Path functor

Updated @icethrush's dijkstra_weights branch to be based on current master. Changes the Path module to be a functor parameterized by a Weight module and adds a default UnitPath module with unit weights.