Kostant Partitions Functions and Flow Polytopes