Fixed some memory problems reported by valgrind.
Merge branch 'master' of github.com:supertuxkart/stk-code
Merge remote branch 'upstream/master' into new_battle_ai