Fix for PAL7164: after analysis of the bug, it was found out that PublishInStudy() in GEOM was called twice from Supervisor. It was done from CanvasPort::sync() function. Since sync() is an asinchronious function, it is called when a signal comes, and in other occasions, it was decided to move the put_in_study functionality to another place - to execute() function of Main, which handles events coming from Engine.
If an event is "Node has successfully finished execution", then its CanvasOutPorts are analized, and if some port has "myIsInStudy" flag - then value of this port is put into study.
It fixes the bug, since execute() is called exactly once on every event (controlled by Supervisor Engine).