Added handling for resending msgs after failure

Network latency/etc. could cause a situation where notifications are sent to apple before an error packet is received. This would cause those notifications to be lost. This code change caches those notifications internally so that on failure they can be automatically resent.

fix for issue froh42/java-apns#8