Characterization of a thioesterase from alcaligenes faecalis and a dehydrogenase from penicillium funiculosum and applications of the dehydrogenase in the preparation of pharmaceuticals and fine chemicals