When downloading and running Bitcoin core for the first time, after clicking through the "Are you sure you want to open. it?" screen, there's a possibility that macOS will pass an argument like `-psn_0_SOME_ID` to the application, which results in a shutdown as it's an invalid argument:

![v0 19 0rc1 args shutdown](https://user-images.githubusercontent.com/863730/67034964-b026fc00-f0e6-11e9-8462-70d0fcf613e6.png)

This only happens on the first run, subsequent opens will work fine, but we should filter these out, otherwise it's a poor and confusing first experience.

{
    return AbsPathForConfigVal(fs::path(confPath), false);
}
static std::string TrimString(const std::string& str, const std::string& pattern)
{
    std::string::size_type front = str.find_first_not_of(pattern);
    if (front == std::string::npos) {
        return std::string();
    }
    std::string::size_type end = str.find_last_not_of(pattern);
    return str.substr(front, end - front + 1);
}
static bool GetConfigOptions(std::istream& stream, const std::string& filepath, std::string& error, std::vector<std::pair<std::string, std::string>>& options, std::list<SectionInfo>& sections)
{
    std::string str, prefix;
    std::string::size_type pos;
    int linenr = 1;
    while (std::getline(stream, str)) {
        bool used_hash = false;
        if ((pos = str.find('#')) != std::string::npos) {
            str = str.substr(0, pos);
            used_hash = true;
        }
        const static std::string pattern = " \t\r\n";
        str = TrimString(str, pattern);
        if (!str.empty()) {
            if (*str.begin() == '[' && *str.rbegin() == ']') {