allow passing custom headers in upgrade-request

// example:
var ws = new WebSocket('ws://host:port/ws', {headers: {cookie: 'key=value;'}});