Understanding and engineering cofactor metabolism: a quest for improved biochemical production