Magnus integrators for linear and quasilinear delay differential equations