avoid changing to uid/gid that are already in effect

Switching to chroot or installing environment require either getuid()==0
or cap_ng support, but creating environment can run even under normal
user, and while setuid() and setgid() for the active user are no-op,
setgroups(0,NULL) is possibly not and could fail (and thus make
creating the environment fail). Since the right uid/gid are already
in effect, assume that in this effect the other groups are correct
as well.
try to use only the best available scheduler

Until now, if there were several schedulers, daemons would connect
to a random one, meaning there would be easily several independent
compile clusters in such cases. Avoid this by making daemons
select the best scheduler from all the broadcast replies they get,
and making schedulers announce their versions and disconnect their
daemons if they see a better scheduler.
Old daemons and schedulers will still of course work randomly,
but if all schedulers in the network support this feature, then even
old daemons will eventually end up connected to the best scheduler.