Fix use-after-free in xsltApplyTemplates

xsltApplyTemplates without a select expression could delete nodes in
the source document.

1. Text nodes with strippable whitespace

Whitespace from input documents is already stripped, so there's no
need to strip it again. Under certain circumstances, xsltApplyTemplates
could be fooled into deleting text nodes that are still referenced,
resulting in a use-after-free.

2. The DTD

The DTD was only unlinked, but there's no good reason to do this just
now. Maybe it was meant as a micro-optimization.

3. Unknown nodes

Useless and dangerous as well, especially with XInclude nodes.
See libxml2#268

Simply stop trying to uselessly delete nodes when applying a template.
This part of the code is probably a leftover from a time where
xsltApplyStripSpaces wasn't implemented yet. Also note that
xsltApplyTemplates with a select expression never tried to delete
nodes.

Also stop xsltDefaultProcessOneNode from deleting nodes for the same
reasons.

This fixes CVE-2021-30560.
16 jobs for master in 12 minutes and 40 seconds (queued for 5 seconds)
latest
Status Name Job ID Coverage
  Test
passed clang:asan #1534744

00:03:50

passed clang:msan #1534745

00:03:26

passed cmake:linux:clang:shared #1534749

00:02:20

passed cmake:linux:clang:static #1534750

00:02:10

passed cmake:linux:gcc:shared #1534746

00:02:02

passed cmake:linux:gcc:static #1534747

00:02:10

passed cmake:mingw:w64-i686:shared #1534752
win32-ps

00:01:59

passed cmake:mingw:w64-i686:static #1534754
win32-ps

00:02:23

passed cmake:mingw:w64-x86_64:shared #1534755
win32-ps

00:02:00

passed cmake:mingw:w64-x86_64:static #1534756
win32-ps

00:02:29

passed cmake:msvc:v141:x64:shared #1534757
win32-ps

00:05:02

passed cmake:msvc:v141:x64:static #1534758
win32-ps

00:06:10

passed cmake:msvc:v141:x86:shared #1534759
win32-ps

00:01:46

passed cmake:msvc:v141:x86:static #1534760
win32-ps

00:01:48

passed gcc #1534742

00:02:04

passed gcc:python3 #1534743

00:02:00