cilium/cmd: restore netns on test exit or failure
cilium/cmd: restore netns on test exit or failure

Restore the original netns on test exit or failure and also check errors
on these operations.

Also make sure to unlock the OS thread and close the test netns on test
failure (i.e. using defer, not only at test exit).

Fixes: 70e5c58c04b6 ("test: add unit tests for `cilium encrypt` and subcommands")
Signed-off-by: Tobias Klauser <059b8b880f8441509ec8a65b50b4c6ae74ebea76@cilium.io>

cilium/cilium,michi-covalent/cilium,michi-covalent/cilium,michi-covalent/cilium,cilium/cilium,cilium/cilium,cilium/cilium,michi-covalent/cilium,michi-covalent/cilium,cilium/cilium