Quasi-exact solvability of Inozemtsev models