Ab initio LCAO study of the atomic, electronic and magnetic structures and the lattice dynamics of triclinic CuWO4