Use generic dialog popup on items config

Unify use of modal dialog
Make popup dialog graggable
Drop ticket flags data

Flags will be reimplemented as a separate feature.
Revisit ticket status

Cleanup status change form
Add resolve to ticket ticket view
Use the new status table when checking for overdue
Drop status column in favour of status_id
Initialize search backend on install/upgrade.

Make table prefix consistent
Support setting status on ticket open by staff

Staff can now select desired ticket status on create
Only allow staff with closing permission to set tickets to resolved state.