Fix: check if next statement is on newline when warning against extra semicolons. (fixes #1580)

Details are explained in #1580.

Added two test cases (the second one, `a++; b++` fails before this patch). All tests pass after the patch.
Oh, good point!