libifconfig: Set error in ifconfig_get_groups
This should return -1 with OTHER/ENOMEM set in the handle when malloc
fails, like everywhere else in libifconfig.
Reviewed by: kp
Differential Revision: https://reviews.freebsd.org/D28964
(cherry picked from commit 1d9ba697f99a88b321a7d8b96fa142ea774cd3be)