Fix delete button

closes #2492
- added when.all() to wait until all posts are deleted before deleting
tags
- added a test