GSiteMap: added gSitemapAppendUrls hook and fixed $id_obj handling for multiple iterations

Allows other modules to append urls to the sitemaps via a hook.
Fixes an iteration problem with large sitemaps having to be split:
- splitting when processing products did result in an infinite loop
- splitting when processing other entities did result in 2 of them being skipped each time