Crystal chemistry and magnetic properties of layered metal oxides possessing the K2NiF4 or related structures