Tuning the redox activity of encapsulated metal clusters via the metallic and semiconducting character of carbon nanotubes