Bug #469 - Automatic unindent on else and elif - revisited fix

I took the fix in https://github.com/ninja-ide/ninja-ide/issues/756 and I address the code review suggested changes.