Shut down the profiler in headless compositing mode
auto merge of #1726 : pcwalton/servo/shut-down-profiler, r=kmcallister

This fixes a hang in content tests in my deleafset branch. No idea why it worked before though…

This just replicates the code in non-headless mode over to the headless mode.

r? @kmcallister