Formation of multi-charged ions and plasma stability at quasigasdynamic plasma confinement in a mirror magnetic trap