van der Waals Stacking-Induced Topological Phase Transition in Layered Ternary Transition Metal Chalcogenides.