(PUP-3898) Fix writing content with checksum
Previously when using checksum on a file resource, the target file's
checksum would be calculated using the selected checksum type, but the
content attribute would use the configured default checksum type. When
these don't match the file would be updated unnecessarily.
This change fixes writing a file from content for a non-default
checksum type when the content is initialized as part of creating a
file resource by re-initializing the content's checksum value after the
checksum type for the file resource has been evaluated. Fix applies to
both puppet apply and puppet agent runs.