[fix] Don't throw error when writes fail for WebSockets, log it as error.
[minor] Introduce readyStates for the Spark so we can return false when closed.

These patches will hopefully resolve #65 but that isn't certain as I can't fully
reproduce this.