Resend notifications after error received from apple

fix for issue froh42/java-apns#8

Based of how node-apn handles their resending of code.
Also added a few more unit tests to test the additions I made.

Unfortunately some of the interfaces had to change (specifically the ApnsDelegate)...

Feedback appreciated.