Control of the Superconducting Properties of YBa2Cu3O7 by Topotactic Redox Reactions