Add constant structure support to Java backend

This change enables constant structure support for the Java backend for the
structures introduced by the polymorphism pass.

compiler/const_struct.m:
compiler/ml_unify_gen.m:
    Enable constant structure support

java/runtime/TypeInfo_Struct.java:
    Add a constructor to the TypeInfo structure for Java.  This constructor
    has the interface expected by the polymorphism code.

    Never expect to be passed the arity to the varargs constructor.

compiler/polymorphism.m:
compiler/ml_unify_gen.m:
    Change how we avoid creating TypeInfos with an explicit arity argument
    for Java

    We never specify the arity for a TypeInfo_Struct in a Java grade.  There
    are two reasons: this is a little difficult to handle due to overloading
    rules and it is not necessary.

    This is handled by removing these arguments in the MLDS backend.
    However, the current solution does not work when we create TypeInfos as
    constant structures.  Therefore this change removes the special case
    from the MLDS backend and instead never creates the arity arguments
    during the polymorphism pass.  rtti_to_mlds.m didn't need updating as it
    already had the correct behaviour.

compiler/rtti_to_mlds.m:
    Update a comment.
Mention portability improvements in 14.01 NEWS.

NEWS:
	As above.
Fix compilation errors in extras.

extras/curs/samples/demo.m:
extras/curs/samples/frogger.m:
extras/posix/hello.m:
	Update library calls where necessary.
Fix more compilation errors in extras.

extras/trailed_update/tr_store.m:
	Conform to runtime changes.

extras/gator/genotype.m:
extras/gator/phenotype.m:
extras/graphics/samples/maze/maze.m:
extras/trailed_update/samples/interpreter.m:
	Conform to standard library changes.
Fix extras/trailed_update/samples/vqueens.m.

extras/trailed_update/samples/vqueens.m:
	Use higher-order any insts to avoid the mode error in this module.

extras/trailed_update/var.m:
	Add extras modes to the freeze predicates that take closures with inst
	any.  (XXX This module could do with a re-write since Mercury now
	implements many of the features that had to be hacked around when
	it was written.)
Merge branch 'version-14_01_01-features' into version-14_01-branch