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

when we create a code block first time its inputs property is underfined and we gets updated = true in spite of it haven't lost focus yet. It means the Flood sends empty value to the Dynamo and the Dynamo deletes it. 
But if a code block node was created in the session at least once each new code block node will have inputs property is empty array (it gives false in if statement)