Added support for GCM time_to_live parameter

Commit 1:
fixes apns test

Commit 2:
Added support for GCM time_to_live parameter.
Also fixes true values in GCM plain protocol, only "1" and "true" are recognized as true.