Update query list on destroy and sync events

Fixes #375.

This fixes the bug where deleting the last query would result in the
loading indicator being visible until the page was refreshed. As noted
in the code, the sync event is not called on the collection when a model
is destroyed. We need to listen for and respond to the destory event on
the collection.