Ticket statuses revisited

* Drop resolved state
* Move status properties to ticket status table.
```sql
SET @statusId = (
```