Add function like check_managed() but that returns the changes
Return a changes dictionary for file.managed in test=true mode

Fixes #17939.
Merge pull request #17941 from whiteinge/salt-file.managed-changes

Return a changes dictionary for file.managed in test=true mode