The top official in charge of prisons in the US state of Tennessee is to step down, after a female death row inmate survived execution by lethal injection.