Fixed bug with loop line, which connected to line port.
More styleGuide.
Some refactoring.
Merge branch 'bugFix' of github.com:rustam-azimov/qreal
minor optimization fixes