Application Placement and Demand Distribution in a Global Elastic Cloud: A Unified Approach