Magnetic properties of CaNi2P2 and the corresponding lanthanoid nickel phosphides with ThCr2Si2 type structure