issue #3713: Adds AutoreleasePool::isClearing() for easily debugging memory issues. It only valid in DEBUG mode.