After two exhausting weeks of chaotic bargaining and sleepless nights, nearly 200 nations banged through the contentious finance pact in a sports stadium in Azerbaijan.