Thermally controlled cyclic insertion/ejection of dopant ions and reversible zinc blende/wurtzite phase changes in ZnS nanostructures.