Fix an error in MultilineIfThen cop that occurs in some special cases.

Fixes these cases:
* there's a `when`...`then` inside the body of an `if`
* there's a commented-out `then` after an `if`
* `then` is on its own line