Magnetic ordering in La1.5Ca0.5CoO4 revealed by resonant magnetic x-ray scattering and neutron diffraction