Symmetry modes and description of distorted phases in hexagonal ABX 3 compounds. Application to KNiCl 3 room-temperature structure