coding crime : never use the expression "if obj" whenever obj is not a simple type.

this code was working just by chance because active_knowledge_pad is a brain, not an ERP5 object.
optimise ERP5Site_getKnowledgePadListForUser.

call getObject() once explicitly to reduce number of calls.
fixup e9b75a2762 (optimise ERP5Site_getKnowledgePadListForUser).
Avoid regeneration of classes when starting a node within a cluster with already started nodes.

When starting a node, ERP5Site.__of__ calls ComponentTool.reset(), which was
never synchronised so it returned True (without generating a new cookie at its
level) and causing synchronizeDynamicModules to be called with
force=True. This generated a new cookie and leading to dynamic classes being
meaninglessly regenerated on all nodes.

Instead, modify ComponentTool.reset() behavior so it *always* reset Portal
Type classes when Components are reset (as it should have always been as the
class inheritance may have been modified) and force regeneration of Portal
Type classes in this method if reset is True.

Signed-off: Vincent Pelletier <vincent@nexedi.com>