Quasideterministic generation of maximally entangled states of two mesoscopic atomic ensembles by adiabatic quantum feedback