gdb: make use of RAII in run_inferior_call
In passing I noticed that there are three local variables in
run_inferior_call that are used to save, and then restore some state,
I think these could all be replaced with a RAII style scoped_restore
instead.
Of the three locals that I've changed, the only one that I believe is
now restored in a different location is ui::async, before this commit
the async field was restored after a call to either delete_file_handle
or ui_register_input_event_handler, and after this commit, the field
is restored before these calls. However, I don't believe that either
of these functions depend on the value of the async field, so I
believe the commit is fine.
Tested on x86-64/Linux passes with no regressions.