Apparently it is quite common for them to lose a toenail or two, they can catch it on something and it breaks off or pulls out. It will grow back fine. The trouble seems to be infection. If it has been pulled out and got infected, then that could have swollen the foot up. Clean the foot and smell it, see if it stinks like infection and see if there's any broken skin/blood/puss. If so, Aloe vera on it will aid healing or you could obviously use something a bit more medical, or anti septic spray etc.
I heard about something called bumble foot, but not sure if that would cause loss of nails.
Also, have you checked for scaly leg mites? Maybe a possible cause?