Mott transition, biexciton crossover, and spin ordering in the exciton gas in quantum wells