Fix OSR issues when we didn't reach finalize.

Harden the logging increment check to make sure it never logs too
much; this is more robust than the exit counter. If we are leaving
an OSR'd frame without doing enough iterations, complete optimization
anyway, since we know it's hot; this as a side-effect also avoids a
number of potential races with bad behavior. nwc10++ for helping to
track this one down.