Problem/Motivation
As part of the general clean-up of the File API, file_save_htaccess() and file_ensure_htaccess() need to be deprecated and moved into services.
Proposed Resolution
Create a new service 'file.htaccess_writer' and deprecate file_ensure_htaccess()
in favour of \Drupal\Core\File\HtaccessWriterInterface::ensure()
Deprecate file_save_htaccess()
in favour of the FileSecurity component added in #3013210: Add drupal/core-filesecurity component for writing htaccess files