patching trunk to use it with Foundations

This branch will just be used temporarily.

The changes made here are essentially the same as the changes made
on the branch v8.4-patched, the latest commit of which is here:
https://github.com/DanGrayson/coq/commit/1c7e9fbf347c6040a262b40a0b49da190bdb77ea