(Maint) Remove whitespace errors

A lot of blank lines had picked up extra spaces.
(#21201) Remove thread-safety code

Puppet does not support running in any threaded environments. The thread
safety code that has been added has been, for the most part, haphazard
and not a holistic solution to the threading problem. There are many
areas that are not protected at all and others that were protected in
incomplete ways. The extra code and logic only caused more complication
in the codebase and is removed by this commit.
(#21201) Remove test for thread-safety

The functions test for thread safety, after many runs after having
removed the thread safety code, still did not fail. This removes the
test.
Merge branch 'maint/master/21201-remove-threading-code'

* maint/master/21201-remove-threading-code:
  (#21201) Remove test for thread-safety
  (#21201) Remove thread-safety code
  (Maint) Remove whitespace errors