pkgix: Add reset_env function to reset environment

Signed-off-by: Marco Elver <me@marcoelver.com>