Build mend, one patch tool for every AI edit format

@r-m-t

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