MariX, an advanced MHz-class repetition rate X-ray source for linear regime time-resolved spectroscopy and photon scattering