Accept pem as binary data.

As an alternative of to supplying the pem path with APNS.pem,
accept the pem binary data with APNS.pem_data.
Add specs for successful notification
Check socket and ssl connection exist before closing.

As the socket or the ssl connection might not be initialized when
closing, we need to check its existance before doing it.
Merges 'joey/master' to accept pem as binary data
Merge 'serargz/master' for extra nil check