merge 8.5 changes into mainline

We made a bunch of magfest 8.5 changes that we are going to want into the master branch for uber2.0

Dom will cherry pick what we need in this pull request and merge it into the mainline

Mostly, it's database replication that we're after.

WORK IN PROGRESS DONT MERGE YET