Avoid a segfault

If the SSL object is NULL, call to SSL_write causes segfault
Remove unused code
Add pragma for building on OS X
Split Payload into SafariPayload and IOSPayload

- It enables to handle iOS and Safari push notifications
Update