[wikimedia] Add patches by Tim

Still pending merge,
https://github.com/facebook/hhvm/pulls/tstarling