* Electron version: 1.4.14
* Operating system: Windows

Hi!
I faced with issue described in this two comments: 
https://github.com/electron/electron/issues/6388#issuecomment-236498471
https://github.com/electron/electron/issues/6388#issuecomment-244483403
The main issue is fixed, but the session is lost if the app is closed immediately after login and setting the cookie.

### Expected behavior
Cookie should be saved.

### Actual behavior
When the app is closed after less then 10-15 seconds a cookie is set, it is not saved when the app is reopened. 

atom/browser/api/atom_api_cookies.cc
details->GetString("domain", &domain);
  details->GetString("path", &path);
  details->GetBoolean("secure", &secure);
  details->GetBoolean("httpOnly", &http_only);
  base::Time creation_time;
  if (details->GetDouble("creationDate", &creation_date)) {
    creation_time = (creation_date == 0) ?
        base::Time::UnixEpoch() :
        base::Time::FromDoubleT(creation_date);
  }
  base::Time expiration_time;
  if (details->GetDouble("expirationDate", &expiration_date)) {
    expiration_time = (expiration_date == 0) ?
        base::Time::UnixEpoch() :
        base::Time::FromDoubleT(expiration_date);
  }
  base::Time last_access_time;
  if (details->GetDouble("lastAccessDate", &last_access_date)) {
    last_access_time = (last_access_date == 0) ?
        base::Time::UnixEpoch() :
        base::Time::FromDoubleT(last_access_date);
  }
  GetCookieStore(getter)->SetCookieWithDetailsAsync(
      GURL(url), name, value, domain, path, creation_time,
      expiration_time, last_access_time, secure, http_only,
      net::CookieSameSite::DEFAULT_MODE, false,
      net::COOKIE_PRIORITY_DEFAULT, base::Bind(OnSetCookie, callback));
}
}  
Cookies::Cookies(v8::Isolate* isolate,