core: Rearrange some of the batch operation code
core: Rearrange some of the batch operation code

This replaces a g_hash_table_foreach() call with use of a GHashTableIter,
saving some function calls and reusing existing variables better.

GNOME/libgdata,Pecisk/libgdata-gtasks,Distrotech/libgdata,Distrotech/libgdata,Pecisk/libgdata-gtasks,Pecisk/libgdata,Pecisk/libgdata-gtasks,Pecisk/libgdata,pwithnall/libgdata,Pecisk/libgdata,Distrotech/libgdata,pwithnall/libgdata