Fix newline/indent issue after one-line-comment

During previous refactorings part of echo_print() was incorrectly removed, which handled end of lines in one line comments ('--[\n]*\n').
Because of that too many new lines were printed after one line comments or indentation of subsequent line was broken.

Additionaly refactor/simplify echo_print(), add comments into it