This was previously done by a raw pointer, which made ownership of the
object prone to failure. It is now done by smart pointer, so the object
cannot be accidentally leaked.
The object was in fact leaked in one of the cases, in the constructor
of PCB_CALCULATOR_FRAME.
These functions, previously in common.h, are only used in about 20 files
in the whole of kicad in total, which means they don't really need to be
in common.h and visible to every single translation unit.
This commit introduces:
* directory_utils.h for generic directory and config path utils
* help_file_utils.h for utilities to do with the help file stack
* env_var_utils.h for utilities to do with environment variables