Allow users to delete the last unpinned query as long as there are pinned queries

Changed a check, when rendering the delete button, to see if there are any queries, not just unpinned queries.

Closes #441