Refactored re-run to only allows transactions that can be rerun

This PR relates to issue: https://github.com/jembi/openhim-core-js/issues/264
We will need to change this POST, PUT and PATCH.