Improve (un)marshaling of dates and durations.

src/json.m:
src/json.marshal.m:
src/json.unmarshal.m:
	Use the ISO 8601 representation of dates and durations
	when marshaling to JSON rather than the underling term
	representation used by the calendar module.

	Fix the quoting style in an error message.
Fix a bug in the unmarshaling of characters.

src/json.unmarshal.m:
	Fix an off-by-one error.
Only allow finite floats to be marshaled to JSON.

src/json.m:
src/json.marshal.m:
	As above.
More general marshaling of Mercury -> JSON.

Implement a lower-level scheme for marshaling discriminated union types to
JSON.  Previously we tried to construct JSON objects whose member names matched
the field names of the Mercury type.  This turned out to be quite limiting
since not all d.u. types have field names and the old scheme could not handle
that.  In the new scheme we map a d.u. type to a JSON object of the following
form:

    {
        "functor" : "<<functor name>>"
        "args"    : [<<functor args as JSON>>]
    }

(If the functor has no arguments then we allow the 'args' member to be
omitted.)

src/json.m:
src/json.marshal.m:
src/json.unmarshal.m:
	Implement the new scheme for marshaling d.u. types.
Add tests of the marshaling functionality.

tests/test_json.m:
tests/test_marshal.m:
tests/marshal.exp:
	As above.
Fix some issues with the test suite.

tests/test_marshal.m:
    Disable a test that's a bit too machine specific.

    Add Java and C# definitions for the foreign_type test.

tests/marshal.exp:
    Conform to the above change.
Fix issue with numeric overflow.

src/json.json_lexer.m:
	Only return number tokens for finite numbers; return
	an error otherwise.

src/json.writer.m:
	Avoid problems with floor_to_int when its argument will
	not fit into a Mercury int.

	Throw an exception if we try to write a non-finite number.

src/json.m:
	Fix a typo.

	Document that writers throw an exception for non-finite
	numbers.
Extend the test harness.

tests/test_json.m:
	Allow the marshaling test to be run separately.

test/marshal.exp:
	Conform with rotd-2014-12-22.
More work on marshaling.

src/json.marshal.m:
src/json.unmarshal.m:
	Do not treat the maybe_error/2 type specially, there is
	no need.

src/json.m:
	Delete some out-of-date comments.

tests/test_marshal.m:
tests/marshal.exp:
	Test (un)marshaling of more standard library types.
Implement marshaling set_bbbtree and cord types.

src/json.m:
	Update the marshaling documentation.

src/json.marshal.m:
src/json.unmarshal.m:
	Implement marshaling of set_bbbtree and cord values.

tests/test_marshal.m:
tests/marshal.exp:
	Include examples of the above in the the test suite.