Rewrite bash tests in Python
Rewrite existing tests in Python 3, taking advantage of Python's unit
testing framework. A simple FFI binding was made using cffi so that
tests can use the library instead of calling out to dbdctl. This
additionally allows using errno for better checks.