src: handle refcounting for Database objects
The current pyalpm implementation does not handle proper refcounting which means the alpm_handle was never freed otherwise accessing an object when the Handle goes out of scope leads to segfaults.
This means everything needs to keep a reference to the pyalpm Handle object for every object created from it. The database object now receives a Handle and increases the refcount for it to stop it from being removed by the Python garbage collector.