restore lex_until_toplevel_semicolon

We will enforce semicolons after declarations, so don't need to be smart
about figuring out when the next declaration starts.

(It would be easy to treat end-of-input as an implicit semicolon too,
but I'm not doing that here.)