make the dnf.Base object a context manager.

This is a good way to ensure close() is always called.