Spin orders and lattice distortions of geometrically frustrated 6H-perovskites Ba3B′Ru2O9 (B′ = La3+, Nd3+, and Y3+)