Fix delete button

closes #2492
- added when.all() to wait until all posts are deleted before deleting
tags
- added a test
Merge pull request #2497 from sebgie/issue#2492

Fix delete button