(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.