Effects of Internal Stress and Martensite Variants on Phase Transformation of NiTi Shape Memory Alloy