gdb: add asserts to gdbarch_register_name
This commit adds asserts to gdbarch_register_name that validate the
parameters, and the return value.
The interesting thing here is that gdbarch_register_name is generated
by gdbarch.py, and so, to add these asserts, I need to update the
generation script.
I've added two new arguments for Functions and Methods (as declared in
gdbarch-components.py), these arguments are 'param_checks' and
'result_checks'. Each of these new arguments can be used to list some
expressions that are then used within gdb_assert calls in the
generated code.
The asserts that validate the API as described in the comment I added
to gdbarch_register_name a few commits back; the register number
passed in needs to be a valid cooked register number, and the result
being returned should not be nullptr.