gdb/python: accept gdbpy_ref in init helpers and return bool

Passing 'gdbpy_ref<> &' instead of raw 'PyObject *' to init helpers
makes ownership of PyObject clearer at call sites, and removes
unnecessary '.get()' calls.
Changing the return type from 'int' to 'bool' improves readability
and better expresses the success/failure semantics.

Approved-By: Tom Tromey <tom@tromey.com>
2 files changed