cleanup: delete lots of unused local variables

Authored by martinvonz.

Description

cleanup: delete lots of unused local variables

These were found by IntelliJ. There are many more, but these seemed
pretty safe.

Differential Revision: https://phab.mercurial-scm.org/D5629

Details