user: implement getgrgid

We have currently the reentrant version implemented, but we are missing
the non-reentrant symbol

Reviewed-by: Nadav Har'El <nyh@cloudius-systems.com>
Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
Remove the Route gathering logic outside of lsroute

The route gathering logic in lsroute can be used by other modules,
specifically the API.

This hides the logic details with a foreach function that iterate over
the routes.

The foreach_route function iterate over the routes and call a lambda
expression function with the current route details.

Reviewed-by: Nadav Har'El <nyh@cloudius-systems.com>
Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>