2.0 master merge

Common root of `master` and `1.9-maint` is 5aa9139. This PR is in two parts - the first merge commit brings in up until 5aa9139. The second merge commit is for everything after 5aa9139 in the master branch, and simply marks those as merged without bringing any changes in (these commits can be ignored, as they have been manually added to `1.9-maint`).

Once this is ok, we should merge `1.9-maint`.