Fix potential double callback issue
Fix potential double callback issue

In node v.0.10, ECONNRESET errors are reported more often (see
https://github.com/joyent/node/pull/4775, for example).

As a result, sometimes this sender can get into a state where it ends up
calling the success callback twice. The test case I've been using is to
send one notification with an invalid notification ID (in addition to
the sentinel with the invalid ID that is added internally).

The following occurs:
*The 2 notifications are sent (mine and the sentinel)
*An error data response is returned for mine
**resendThroughApns is called for the sentineal
*Sometimes, the connection is ALSO closed with ECONNRESET
**reconnect is scheduled for 1 second later
*The origin resendThroughApns connects and resends, calling the calback.
However, the notifications array is not modified in this case.
*reconnect fires, resulting in one more resend.

To get around this, reconnect timeouts are cleared before sending any
callbacks. Additionally, if a reconnect event does fire, but the
notifications array is empty, then the reconnection is cancelled.

lblazecki/nodejs-apns-secure