Introduce py-ref.h
This patch introduces class gdbpy_ref, which is a sort of smart
pointer that owns a single Python reference to a PyObject. This class
acts a bit like unique_ptr, but also a bit like shared_ptr (in that
copies do what you might expect); I considered going solely with
unique_ptr but it seemed quite strange to have a unique_ptr that
actually manages a shared resource.
Subsequent patches use this new class to simplify logic in the Python
layer.
2017-01-10 Tom Tromey <tom@tromey.com>
* python/py-ref.h: New file.