Function to calculate remaining bytes in a payload

This can be used to determine how long the alert string can be without
going over Apple's 256-byte limit.