Field-induced transitions in the two-dimensional antiferromagnets K2CoF4 and K2MnF4 in ultrahigh magnetic fields up to 150 T