Court rejects much of Arizona immigration law, upholds status checks