(Bug 52405) Updated handling of sol-transparent tokens

* In the PHP preprocessor, category links just change page state
  and get preprocessed to an empty string and are therefore,
  transparent to further passes.  In particular, in Parsoid,
  this affects sol-transparency checks in the pre-handler.

* This makes category links sol-transparent which in turn
  fixes the pre-handler issues.  I removed custom sol-transparent
  checks in paragraph-handler, improved sol-transparency checks
  and used same checks in pre- and p-handlers.

  This also exposed buggy p-wrapping for "14. Ref." test.
  I updated the test to include a missing p-wrapper.

* Added new parsoid-only parser tests. Didn't add php tests
  since the "Category / paragraph interactions" test captures
  the empty-output behavior of the php parser.

* Tested on pl:Polietylen and pl:Darmsztadt and verified the
  absence of <pre>s

* Unrelated fix: Fixed an oversight from 6f6ac1db where I was
  meant to be testing nested ext-tags rather than just nested
  ref-tags.

Change-Id: Ifccdcfd3d01aec50f9ac8966a2cbfe7cbfc2eec9
Merge "(Bug 52405) Updated handling of sol-transparent tokens"