ui: Reduce mutation of html.classList (#5974)
ui: Reduce mutation of html.classList (#5974)

Throughout the app we mutate the value of the root node classList on
navigation between separate pages (basically on URL change).

Every template has a unique classList for example `template-service
template-show` and `template-service template-list` etc etc.

When navigating between 2 pages, both pages using the same template yet
with different data, previoulsy we would entirely clear out the
`html.classList` and then refill it again with eaxctly the same classes.

This commit moves this to perform a diff previous to mutating the
classList, and then potentially no classList mutating is needed when
moving between 2 pages of the same template.
kingland/consul,scalp42/consul,42wim/consul,hashicorp/consul,hashicorp/consul,kingland/consul,scalp42/consul,42wim/consul,kingland/consul,42wim/consul,42wim/consul,kingland/consul,hashicorp/consul,scalp42/consul,hashicorp/consul,scalp42/consul,scalp42/consul,kingland/consul,42wim/consul