Local unitary equivalence and entanglement of multipartite pure states