Fix copy_file again; expand documentation and add tests
- hook-functions: Expand documentation of
copy_execandcopy_file - hook-functions: Restore
copy_file's handling of target ending in slash - autopkgtest: Add tests for
copy_filefunction
Closes: #1082647