Throughput-Aware Partitioning and Placement of Applications in Fog Computing