Build mend, one patch tool for every AI edit format

@waysvan077

mend: full four-format patch applier, three-tier matching, Sent through the API