Fixed|libdoomsday|Thinker: Crash at shutdown after zapping a thinker

Zapping should retain the malloc flag of a thinker so that it can
be later freed using the appropriate function.
Fixed|XG|libcommon: Misuse of dummy mobj in XG leading to a crash

p_xgsec was converted to C++ with some minimal cleanup. XG now allocates
thinkers using ThinkerT, and does not call memset on the dummy mobj
(which is a C++ instance).

IssueID #1855