Spin dynamics and magnetic ordering in the quasi-one-dimensional S=12 antiferromagnet Na2CuSO4Cl2