(PUP-1840) Remove use of "use"

Puppet.settings.use isn't needed in these areas of code and we can rely
on the setting having a value. Also by putting the validation on the
setting itself no other areas need to validate it.
(PUP-1840) Remove unused constant

There isn't any need for the DEFAULT_DIGEST_ALGORITHM anymore since
everything can use the setting.
(PUP-1840) Remove magic variables from shared context

Putting these values in shared context just makes it harder on any
readers to track them down later. They are only used in 2 places and so
can be put there.
(maint) Remove redundant and useless tests

Some of these tests were preserved simply because they are there. On
closer inspection many were not needed because either they tested
functionality that simply doesn't exist (and it isn't very useful to
state that the functionality doesn't exist), stated the condition
incorrectly and misleadingly, or are handled in other places.