make unoconv more convenient to use as a lib

Hello,
I use unoconv to convert documents uploaded in a web application. I find it very convenient because unoconv does a lot of hard to do configuration stuff. (see https://github.com/alexgarel/document-chain)
How ever unoconv is really meant as a script, I here propose a refactoring to avoid globals and isolate them in a job object. The refactoring also use logging module instead of print, to permits a finer configuration by a caller.
This is quite a big refactoring but the test pass (I know the test is quite minimal) on my xubuntu 13.04 with libreoffice  4.0.2.2. You may review this, you can ask me questions.