5.0.0

This is just a copy of the 4.1.0 branch, since there are so many changes here I think we should release it as 5.0.0-b1 first