[PATCH v3 10/26] binman: Refactor fit to generate output at the end