(bug 38125) ve.init.mw.ViewPageTarget: Preserve original query

* Use 'href' of #ca-edit instead of constructing it manually.
  MediaWiki's output of #ca-edit already takes care of all needed
  queries, including "oldid" (bug 38125).

* Misc clean up:
 - Use .get() instead of accessing the array directly.

* Clean up setupSkinTabs and add more inline documentation.

Change-Id: I7d702a3eb1f9ce23a5e3c9e846b00da5cead386e
Merge "(bug 38125) ve.init.mw.ViewPageTarget: Preserve original query"
Quick link inspector fix to support recently changed types.

Change-Id: I095968db70b2f523cdd50d51242268894aa7ddec
TODO: Link Inspector needs to support all 6 link types.
Throw ve.Error instead of string literals

Throwing strings is bad because it doesn't include a lot of important
information that an error object does, such as a stack trace or where
the error was actually thrown from.

ve.Error inherits directly from Error. In the future we may create
more specific subclasses and/or do custom stuff.

Some interesting reading on the subject:
* http://www.devthought.com/2011/12/22/a-string-is-not-an-error/

Change-Id: Ib7c568a1dcb98abac44c6c146e84dde5315b2826
Merge "Throw ve.Error instead of string literals"
After much research on error objects, native = good, custom = bad

Stack traces, line numbers, etc. All the approaches I've seen are bad hacks. This is the best way to go.

Change-Id: Ib12e9d2ecfe610bcc89d046005e35cc13efa3d99
This should never happen, but if it does, lets make sure we know

In the past, this has cause things to break in mysterious ways

Change-Id: I2fcf1e2a9cf776a9ab9b3969d9ec552e23120e79
Localisation updates from http://translatewiki.net.

Change-Id: I5ea0797c64d08bd8d198140cefcaece5d217aa7c
Rename wikiLink to WikiLink everywhere

Was causing link inspector breakage

Change-Id: Idf12f90aec9cbd2ddca47c66eb9e6e705a0e48f5
Merge "Rename wikiLink to WikiLink everywhere"
Preserve HTML attributes for textStyle/* annotations

The new annotation API will do this too; this is a temporary hack to fix
the bugs caused by stripping attributes.

This code doesn't actually render the attributes, but the new annotation
API will.

Change-Id: Ic0ddf822fe02f101f2e825080c6bcc2a03115974
Add ve.dm.BreakNode to represent <br>

Change-Id: I3825199c3c8cbe3b50c01e03f39f20cef7c55a28
Merge "Add ve.dm.BreakNode to represent <br>"
Removing redundant overrides for canHaveSlug* methods

Change-Id: I2bfd08eab1cd45a193d91540bc0602549884fa89
Added basic ve.dm.SurfaceFragment class

Lots left to do here, but this is the future API for working with documents

Change-Id: I7b7e705ad4d922f37c327042051634a61dc8be66
Merge "Added basic ve.dm.SurfaceFragment class"
Strip leading and trailing whitespace in text

Right now this means things like headings and list items are rendered
nicer (without the whitespace), but also get their whitespace normalized
when saving back. I'll submit code tomorrow that preserves this
whitespace.

Submitting this now because it's needed to make <br>s look reasonable

Change-Id: I4b5e5ad8ee1bbe2f1eaf0fb860dd59f6e401dc3d
Make use of new jshint options

* Restricting "camelcase":
  No changes, we were passing all of these already

* Explicitly unrestricting "forin" and "plusplus"
  These are off by default in node-jshint, but some distro of jshint
  and editors that use their own wrapper around jshint instead of
  node-jshint (Eclipse?) may have different defaults. Therefor
  setting them to false explicitly. This also serves as a reminder
  for the future so we'll always know we don't pass that, in case
  we would want to change that.

* Fix order ("quotemark" before "regexp")

* Restricting "unused"
  We're not passing all of this, which is why I've set it to false
  for now. But I did put it in .jshintrc as placeholder.
  I've fixed most of them, there's some left where there is no clean
  solution.

* While at it fix a few issues:
 - Unused variables ($target, $window)
 - Bad practices (using jQuery context for find instead of creation)
 - Redundant /*global */ comments
 - Parameters that are not used and don't have documentation either
 - Lines longer than 100 chars @ 4 spaces/tab

* Note:
 - ve.ce.Surface.prototype.onChange takes two arguments but never
   uses the former. And even the second one can be null/undefined.
   Aside from that, the .change() function emits
   another event for the transaction already. Looks like this
   should be refactored a bit, two more separated events probably
   or one that is actually used better.
 - Also cleaned up a lot of comments, some of which were missing,
   others were incorrect
 - Reworked the contentChange event so we are no longer using the
   word new as an object key; expanded a complex object into multiple
   arguments being passed through the event to make it easier to work
   with and document

Change-Id: I8490815a508c6c379d5f9a743bb4aefd14576aa6
Merge "Make use of new jshint options"
Rename external link RDFa types to keep up with Parsoid

Change-Id: Ie232a575339a16431cbd1ee216998d1f6bf52d78