move the complex patch management routines into a new file, and make the merge up function available from patch pages
clean up Patch.getDiff --- before I understood the async module I made things too complicated
export the code