Bug fix: casting badge number into integer doesn't work

The following line is almost unuseful because this will be done after encoding payload to JSON.
> $payload->{aps}{badge} += 0
So, bring this to the first of the method (before encoding)