[FIX] Work package priority deletion

Implements [ticket 2683](https://www.openproject.org/issues/2683)
Implements [ticket 2685](https://www.openproject.org/issues/2685)