Error handling fixes

Here are some changes as discussed in https://github.com/LearnBoost/engine.io-client/pull/291

Refactoring suggestions for the probe function, @guille?