Magnetic susceptibility, specific heat and magnetic structure of CuNi2(PO4)2