[PATCH v2 10/25] binman: Refactor fit to generate output at the end