Enable mobi generation by comic2ebook

And a bunch of other stuff done to make that neater.
Refactors multiple chunks of code that were either duplicated or not GUI-specific from KCC_gui.py to comic2ebook.py, as well as breaking up functions in comic2ebook to aid reuse.