(#18110) Don't do recursive backup when not needed

First check if we are actually going to replace the directory before
starting to do a backup of it.
(#18110) spec tests for bug fix
(maint) refactor Type::File#remove_existing

Puppet::Type::File#remove_existing was providing too many behaviors and
was becoming unreadable. It checked if a file could be backed up,
performed the backup, failed if the backup failed, and conditionally
removed files and directories.

This commit refactors the method and extracts a number of different
methods that each implement a part of the behavior desired. This commit
also standardizes the return value of the method to boolean values and
adds some documentation on the method signature and exceptions raised.

Paired-With: Andy Parker <andy@puppetlabs.com>
Merge branch 'pull-1502'