On geometric invariant theory for infinite-dimensional groups