Genshi support, as well as testing optional dependencies

Please don't merge this. Let us tidy up history first.