* Electron version: 1.8.2-beta.3
* Operating system: MacOS 10.12

### Expected behavior

File downloads from custom protocols should complete without issue.

### Actual behavior

Before even triggering the custom protocol handler, the download-item emits 'done' with a state of 'interrupted'. In my demo linked below, I use the new registerStreamProtocol, but I was able to reproduce using registerHttpProtocol as well.

### How to reproduce

Use https://github.com/pfrazee/electron-download-interrupt-bug

atom/browser/api/atom_api_protocol.h
scoped_refptr<brightray::URLRequestContextGetter> request_context_getter,
      v8::Isolate* isolate,
      const std::string& scheme,
      const Handler& handler) {
    auto job_factory = static_cast<AtomURLRequestJobFactory*>(
        request_context_getter->job_factory());
    if (job_factory->IsHandledProtocol(scheme))
      return PROTOCOL_REGISTERED;
    std::unique_ptr<CustomProtocolHandler<RequestJob>> protocol_handler(
        new CustomProtocolHandler<RequestJob>(
            isolate, request_context_getter.get(), handler));
    if (job_factory->SetProtocolHandler(scheme, std::move(protocol_handler)))
      return PROTOCOL_OK;
    else
      return PROTOCOL_FAIL;
  }
  
  void UnregisterProtocol(const std::string& scheme, mate::Arguments* args);
  static ProtocolError UnregisterProtocolInIO(
      scoped_refptr<brightray::URLRequestContextGetter> request_context_getter,
      const std::string& scheme);
  
  void IsProtocolHandled(const std::string& scheme,
                         const BooleanCallback& callback);
  static bool IsProtocolHandledInIO(
      scoped_refptr<brightray::URLRequestContextGetter> request_context_getter,
      const std::string& scheme);
  
  template<typename RequestJob>
  void InterceptProtocol(const std::string& scheme,