Implemented new logic in DB to store data about unclaiming of tasks and PHP code throughout the system to cooperate with it. Closes #937