Preparation of compounds having hydroxy or O-metal groups bound to a carbon atom not belonging to a six-membered aromatic ring by elimination of -OH groups, e.g. by dehydration