only clear queue if response arrives from sync, and only clear items from before the sync was requested

git-svn-id: svn+ssh://organicdesign.co.nz/tools@848 5e2f9ad9-d71a-4c5e-ba50-a8a02cc83e87