dtbook-to-odt: factor out some stuff and move it to odt-utils