add support for --dump-toolchain-env

This is not complete yet, in particular because:

* it currently requires that the toolchain module is already available, which may not be strictly necessary (not sure yet)
* if the module for the easyconfig file used is already available, this currently requires `--force` to actually get the build env dumped
* may need some code cleanup

cc @ocaisa