Bipartite Matching and Routing with Congestion Costs: A convex approach to robot task assignment and the multi-agent pathfinding problem