core: For some reason as yet unknown to me, __del__ is sometimes called twice on COM pointer objects, which causes Release() to be called more than it should. This is very nasty, as it eventually causes us to use a pointer which has already been freed. Fixes exceptions in __del__, crashes and probably other problems, mostly in Firefox.