Particle-number conservation within self-consistent random-phase approximation