emacs: build with libxml and optionally GnuTLS

Closes #20070.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>