Theory of the (3 x 2) reconstruction of the GaAs(001) surface