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.
Since the opt out pattern test is always done with the call to `isUnnecessarySemicolon()`, does it makes sense to move the test into the function?