Improve Transport and Socket reliability

1. Add a new Transport readyState 'open' used in handling upgrade
2. Make Transport close safe to call multiple times
3. Reliable close event and cleanup for polling transport
4. Disable writable since closing for websocket
5. Fix issues while upgrading
6. Clean up some comments and debug logs
7. Always close Transport when Socket closes