Fix problems with template arg wikitext escaping

Used SelfclosingTagTk for mw-quote, url-link, behavior-switch WT
----------------------------------------------------------------
* url-link and behavior-switch are self-contained and so
  SelfclosingTagTk make more sense for them anyway.  ext-links
  and wiki-links already use SelfclosingTagTk and so using TagTk
  for url-links seems to have been an oversight.

* mw-quotes are special in that there is no way to know whether
  a mw-quote seen in the tokenizer will be a opening tag, closing
  tag, or be split into multiple tags.  So, SelfclosingTagTk for
  each individual quote sequence does make more sense.

* This change has the beneficial side-effect of eliminating incorrect
  nowiki-escaping in tranclusion-arg wikitext.  That escaping code
  relies on SelfclosingTagTks and well-balanced TagTk, EndTagTk pairs
  and escapes wikitext chars in unclosed segments.

  This was a problem for quotes since something like
  {{echo|''[[Foo]]''}} would RT to {{echo|<nowiki>''[[Foo]]''</nowiki>}}
  since the two quote sequences were tokenized to TagTks
  (and thus, unabalanced).

Escape pipes from url/extlink args
----------------------------------
* This fix makes sure bare pipes found in URLs doesn't interfere with
  template arg parsing

$ echo "{{echo|http://foo.com/ab}}" | node parse | sed 's/ab/a|b/g;' | node parse --html2wt
{{echo|http://foo.com/a&#124;b}}

$ echo "{{echo|[http://foo.com/ab ab]}}" | node parse | sed 's/ab/a|b/g;' | node parse --html2wt
{{echo|[http://foo.com/a&#124;b a&#124;b]}}

Parser test results:
--------------------
* One additional html2html failure.  The failure is legitimate and
  was being hidden by the wikitext escaping code in the serializer
  which assumed that the tokenizer generated SelfclosingTagTk for
  url-links (which it did not till now).

Minor: cosmetic formatting change
---------------------------------
* Fixed formatting of some code in mediawiki.Util.js

Change-Id: Ib573c1347ad279425577a42845e0226e7b36a06c
Merge "Fix problems with template arg wikitext escaping"