add write_gcm plugin

Yes, I thought about it after changing to use libyajl, but it's a fair amount of the work and the current BUFFER_ADD (copied for write_http) works relative well for this simple json building task. Maybe we can check it as the first version for now and update it sometime later.