Support custom preferences path
The idea is to truly allow FSO to be portable along with Knet launcher, with being able to set a custom folder for the pilots and settings it is possible to have a folder stucture where the knossos library is portable along with the the knossos executable and still reading the pilots and saving settings to a portable location inside the library itself.
The older portable mode is not enoght for this (i was wrong, it still works, it just that due to the argument parsing order the wrong pref_path is printed on "-get_flags json_v1", but this should not affect functionallity). But it is not adecuate for this as it implies that changing the executable (like, downloading a new version) would losse all pilots and settings that will be left behing on the old exe location or worse deleted by deleting the fso version.
I did test it by setting a env variable in windows FSO_PREFERENCES_PATH to "D:\test dir" (without quotes), and the data folder was succesfully saved inside that folder along with graphical settings and new pilots.
I would like advise on the env variable name, if it feels right, and offcourse, anything i need to change to add.
Note: this does not overrides portable mode, if -portable_mode is set the executable location will be used instead.
~Note2: There is a bug on os_is_legacy_mode() line 523 as auto old_config_exists = true; defaults to true and it is never changed anywhere, FSO never searchs for the old file or registry settings on windows, resulting in defaulting the legacy mode to ON if the fs2_open.ini is not present on the preferences path, overriding it to ".//".~
~This also needs to be investigated on linux as i seem to remember the message of legacy mode being printed all the time there.~
~I belive this should be addresed on a separated PR if thats not the intended behaviour.~