Patches rebased to apply cleanly.
Remove patches which have been applied upstream. Remove old patches that were to help with the 3.8->4.0 migration. Rebase the remaining patches.