Rerun refactor

Ive included a middleware file to update the original transaction with the rerun transaction ID as well as updating the task with the ID and status of the rerun. The task update additional information is used on the tasks endpoint.