Remove unneeded static function (only used once).
(cherry picked from commit fbf4728cf8232313ffcf2e08716ca7924c9e5c83)
Made file copies and edits preserve extended attributes.

This means that ACLs and security context information will be copied
along with a file if the "preserve" attribute is set and the copy is
local, or if the copy is part of an edit operation. For remote copies,
only Unix mode is preserved. If the preservation is unsuccessful, the
promise will fail.

Solves issue 2728.
(cherry picked from commit f250771fcce82df46273fc39dec1a216189f655e)
ChangeLog update for #2728
Merge remote-tracking branch 'upstream/3.5.x' into 3.5_surfsara