Sprinkle some const-correctness on the unidiff application code.
Suggested by: gstein
* subversion/libsvn_client/patch.c (patch_target_t): Mark two fields const. (apply_textdiffs, init_patch_target, determine_hunk_line, merge_hunk, apply_one_hunk, maybe_send_patch_target_notification, apply_one_patch): Mark some parameters const.
Refactor the unidiff application code for readability and cleaner logic. No functional change intended.
* subversion/libsvn_client/patch.c (patch_target_t): Move some field declarations around, and add new fields KIND and SKIPPED. Also tweak a comment. (report_skipped_target): Remove this function. All notifications are now handled at one single place. (resolve_target_path): Remove output parameters RESOLVED and EXISTS, and all calls to report_skipped_target(). Make use of the new KIND and SKIPPED fields in patch_target_t instead. Also tweak and remove some comments. (check_local_mods): New helper function. (init_patch_target): Track changes to resolve_target_path(), and use the new check_local_mods() helper. (copy_lines_to_target): Drive-by whitespace fix. (maybe_send_patch_target_notification): New helper function that handles notifications. (apply_one_patch): Clean up the logic by using the new KIND and SKIPPED fields in patch_target_t and delegate notification business to the new helper function maybe_send_patch_target_notification().