routing: Refactor helper to run function in netns
routing: Refactor helper to run function in netns

[ upstream commit 18da31432; forward-ported from v1.7 tree ]

This makes it usable for an upcoming commit which adds a new test suite
to this package.

Signed-off-by: Chris Tarazi <711c73f64afdce07b7e38039a96d2224209e9a6c@isovalent.com>

tgraf/cilium,tklauser/cilium,michi-covalent/cilium,michi-covalent/cilium,tgraf/cilium,michi-covalent/cilium,tgraf/cilium,tgraf/cilium,tklauser/cilium,michi-covalent/cilium,cilium/cilium,tklauser/cilium,michi-covalent/cilium,cilium/cilium,cilium/cilium,tklauser/cilium,cilium/cilium,tklauser/cilium,tgraf/cilium,tgraf/cilium,cilium/cilium