Switching between apparently redundant iron-uptake mechanisms benefits bacteria in changeable environments