General Approach to Well-Defined Perovskite MTiO3 (M = Ba, Sr, Ca, and Mg) Nanostructures