prof_state_toggle: keep a count of CPUs with profiling enabled
On MULTIPROCESSOR systems, the following sequence of kgmon(8)
invocations leaves the statclock() frequency at stathz when there is
still a CPU on the system where the gmon state is GMON_PROF_ON:
# kgmon -c 0 -b
# kgmon -c 1 -b
# kgmon -c 0 -h
The problem is that we aren't counting CPUs with profiling enabled.
Add "gmon_cpu_count" to keep a count. Call startprofclock() for the
first CPU to enable profiling and stopprofclock() for the last CPU to
disable profiling.