Drupal 10 compatibility, removed jQuery and jQuery.once, various phpcs fixes
Closes #3299333.
This MR is based on the rector patch, additionally replaces jQuery and jQuery.once with vanilla JS and minor coding style changes proposed by phpcs/phpcbf.