Handle errors in GCM responses

Delete devices from the database if the appropriate errors are returned.
If "error" is different than "Unavailable", delete the device.
    
This is according to:
http://developer.android.com/google/gcm/http.html

We have the same number of db queries as number of errors. 
Instead of this we should prepare list of `reg_id` first, then using single query get appropriate devices.