Add unit tests for Python module

Uses the built-in unittest module in Python. The test suite is run
automatically on `make installcheck` which is also execuated on
`make distcheck`. The check could also be done in `make check` but
this seems more difficult since the actual path to the Python C
module is hidden by libtool.