Move windowing code out of the compositor

This is mainly just moving code around, in preparation for further changes to
the "windowing" API.
auto merge of #3563 : mbrubeck/servo/app2, r=larsbergstrom

This includes the previously-reviewed commits from #3533, plus additional fixes for test failures, and a workaround for CEF link errors on Mac (related to rust-lang/rust#14344).  Opening a new PR because this required a fairly invasive rebase, and the original was polluted by a bunch of test commits. r? @larsbergstrom