fixed some memory issues that valgrind detected

All of the XX::GetInstance() calls in the WrappXX classes allocate
memory. This happens in a lot of GetXX() calls.
What I did was to store the pointer and free the memory.

Especially on things like "HasWeapons" this is a bit nasty.
Sadly memory issues persist, though.