Dramatically simplify IconElement.setIcon()
Dramatically simplify IconElement.setIcon()

While this code is not an actual performance bottleneck, it still
showed up in the flamegraphs I did for T296335. A lot of OOUI
widgets use this mixin. This code is called a lot, even if there
is no icon. This adds up in large dialogs like the VisualEditor
template editor.

This patch optimizes the code for the default situation when
there is no icon. In this case `this.icon` is null (set in the
constructor) and .setIcon() is called with null.

Note this patch removes (unintentional?) features:
* String identifiers are not trimmed any more. I wonder why this
  was done here. There are many other places in OOUI that use
  string identifiers. No code working with these expects optional
  whitespace.
* An empty string is not an expected input any more. However, the
  new code will continue to produce the same output as before.
* this.updateThemeClasses() is not called any more on
  construction time when there is no icon. I believe this is fine
  as it wouldn't do anything anyway.

Bug: T296335
Change-Id: Ifa9cb1ab6db54f595104bb366f7c90b50c0c0b54

wikimedia/oojs-ui,wikimedia/oojs-ui,wikimedia/oojs-ui,wikimedia/oojs-ui