Density functional calculations of Ti nanoclusters in the metastable Mg-Ti system