smp_topo(): make it idempotent
If more than one call to the function occurs, it currently allocates the
same amount from the group[] array, eventually leading to the memory
corruption.
Noted and reviewed by: markj
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D39981