Bug 720972 (optmenu): Refactor template data generation

Previously we used the completer instance as the data for the template,
however this didn't make much sense since the set of things that were
important to templates and the set of things important to being a completer
were disjoint sets, and using properties (the old way) meant either
inefficient code that re-calculated properties, or cached values (what we
did) which caused subtle sequencing issues. Now we just have a simple
(if a little large) function to generate the template data.
Bug 720972 (optmenu): Tidy assignment constructor

Assigning to prototype like that is asking for confusion, and the point
(so that tools had something to document) hasn't happened.
So we move the docs into the constructor.
Bug 720972 (optmenu): Allow valueArg to be null

Requisition uses it with null when there is only one part of a named
argument, so we this code should accept that.
Also tidy up the over-reaching docs.
Bug 720972 (optmenu): Add _toSummaryJson

_toSummaryJson alows us to see at a glance what the state of the command
line it. This is useful partly in debugging because it saves digging down
and could be useful in testing to check the state of a large number of
things at the same time, however we will need to ensure that it's stable
before using it in testing too much.
This patch also changes a demo command that we use for debugging. This
change does not reach Firefox.

REBASE: make summaryJson a property

tweak command
Bug 720972 (optmenu): Swap isBlank() for .type and BlankArgument

This gives us a bit more information about how the command line got to be
in the state that it is, it's also more consistent with how Argument works
in general. Also it means consumers of Argument do not need to import all the
subtypes in order to get type information (and it's not going to break in a
cross frame situation)
Bug 720972 (optmenu): Various minor changes

Fix minor number parsing bug: '-' is an incomplete number, not an error
We need to make it a special case because otherwise we try to parseInt it
which errors.
Remove inconsistent documentation, add thoughts on future Argument refactoring
Bug 720972 (optmenu): Support incomplete named args

Previously we supported named arguments, but we didn't cope well with
them being incorrect while they were being typed, which is clearly needed
for a menu to help.
This makes _unassigned to be an array to which we add dynamically created
instances of UnassignedAssignment rather than merging them which was always a
bit of a hack.
Bug 720972 (optmenu): Basic menu support

Create a ParamType. This also fixes a bug where an extra space was inserted in
the empty parameters, which was caused by us mutating an argument rather than
creating a new one.
Bug 720972 (optmenu): Fix bad comparison logic

Act if we've got something to act on, not if we haven't
Bug 720972 (optmenu): Extract out setAssignment

Extract out Requisition.setAssignment, so we can do the args checks properly.
We were just adding the args if they were missing, now we're also replacing
them if that needs doing too.
Bug 720972 (optmenu): Add checks for defaultValue

Optional parameters must have a defaultValue (unless they are boolean), which
is a check that we didn't make explicit before.
Bug 720972 (optmenu): Add unit tests

These test allow us to test the type of arguments, and allow testing of
different ways to get the command line into any given position.
Merge branch 'master' into optmenu-720972
Merge branch 'optmenu-720972'