Feature/restrict query deletion

- The delete button now works!
- Only available to those with the permission to edit queries.
- Only deletes a query if it is not being used in a dashboard.
- Queries can be deleted from either /queries or /query/query_id