mediawiki.htmlform: Refactor and clean up

* Use .filter function instead of concatenating strings.
  The end result is the same.

  It's faster and more stable and semantically correct this way
  because using the string syntax is subject to bugs when using
  special characters (you'd have to escape it first, which is
  non-trivial to do in CSS selectors, sometimes impossible).
  So comparing the .name property against a string value directly
  is much easier.

* Use .prop() instead of .attr() where appropiate.
  attr() changes attribute nodes only in the DOM, properties
  reflect the actual live rendered value. This works because of
  a back-compat layer in jQuery, but has been deprecated.

* Use a simple array and create 1 jQuery object, instead of
  creating various temporary objects only to have jQuery merge
  them via .add(). .add() is relatively expensive in that it
  keeps a reference in pushStack and does a lot of logic. Fine
  for convenience, but since we have all the data right here,
  might as well take a more direct approach.

* Remove ill-informed $() calls. This is already a jQuery object
  for the method is a jQuery method. Cloning the object first
  leads to unexpected side-effects and is simply not neccecary.

* Remove use of .live()

Change-Id: Icfe63a4111026661c53639b72e67a4d4fa3d6ac2
Merge "mediawiki.htmlform: Refactor and clean up"