Add cleanupCmds option to pkgs.myEnvFun

This option allows the user to specify commands to run when the shell
exits. This can be used to cleanup operations done in `extraCmds'.

Please notice that the 'trap' approach required me to remove the `exec' in front of @shell@ in loadenv.sh. I don't think this is a problem, but it might be for special use cases.