Added fix for out of memory loop on repeated player reconnection (should hopefully also fix pokemon going missing on reconnection)
Extended API to handle events on pokemon fainting and trainer being beaten
Merge branch 'master' of https://github.com/MrMasochism/Pixelmon