CodeBlockNode fix and some code refactoring

What was wrong with code block node:
Empty code block node should be deleted when it loose the focus - the same behavior is implemented in the Dynamo. So it had been done a code block gets the focus right after its creating. But it doesn't take into account the case when a code block node is being loaded with other nodes. In this case code block shouldn't get the focus - this fix is in this PR.
Also this PR contains some code refactoring

flag that means whether the code block node is created by user (and it should get the focus) or it is being loaded among other nodes