Check redundant state updates

Closes #621

Database state table status updates in `task.py` are now redirected through `set_status`. This has an if statement in it to only carry out the update operation if the task status is not equal to the one being set to.