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
So you can compress this into a single line using the ternary operator, like this:

```
return value ? value.format("DD/MM/YY HH:mm") : "" ;
```