Three-jet production in diffractive deep inelastic scattering at HERA