Use pointer_equal instead of a bespoke predicate.
Fix compiler abort looking for stream.put (Mantis bug 369).

compiler/module_imports.m:
    Implicitly import stream.m if the module being compiled may call
    stream.string_writer.format.

compiler/simplify_proc.m:
    Keep stream.put around until format_call.m may need it.

compiler/pred_table.m:
    If looking for a predicate fails, generate an error message that mentions
    the module name part of the fully qualified predicate name being
    looked for.

tests/hard_coded/stream_put_bug.{m,exp}:
    New test case, based on one contributed by sebgod (the filer of
    Mantis bug 369).

tests/hard_coded/Mmakefile:
    Enable the new test case.
Minor improvements.

compiler/simplify_goal_ite.m:
    Fix the English in some comments.

compiler/simplify_goal_switch.m:
    Give a variable a better name.
[java] Remove dead code

java/runtime/MercuryThreadPool.java:
    As above.
[java] Fix locking bug in Java ThreadPool.

Fix a bug that made it possible that the tasks_lock could be locked but
never unlocked if an exception was thrown.

java/runtime/MercuryThreadPool.java:
    As above.
[java] The thread pool now works when Mercury is used as a library

The thread pool code used in the Java backend was tied the execution of
main/2.  However if Mercury is used as a library the thread pool won't have
been started and threads created with thread.spawn would not be executed.

This patch makes it possible to start and stop the thread pool independently of
main/2 by calling startup() and shutdown().  These calls are called
implicitly by calling runMain().  The thread pool can also be started on
demand.

This patch also adds the MercuryRuntime class, which now contains methods
that may be called by users' Java code to interact with the Mercury runtime
system, including a new finalise() method.

java/runtime/MercuryThreadPool.java:
    Add startup() method.

    shutdown() method is now public and it's meaning has changed, it now
    requests the shutdown rather than performing it.

    Renamed some variables to make their meanings clearer.

java/runtime/JavaInternal.java:
    Initialise the ThreadPool and MercuryOptions objects on demand.

    Make all members of this class static to avoid confusion.

    Add a private constructor.

java/runtime/MercuryRuntime.java:
    Add methods that can be called by Mercury users to interact with the
    runtime system.  Including a convenient finalise() method that does all
    the finalisation.

samples/java_interface/standalone_java/mercury_lib.m:
samples/java_interface/standalone_java/JavaMain.java:
    Extend the standalone Java example so that it makes use of threads: Add
    a fibs function in Mercury that uses concurrency and therefore starts
    the thread pool; call it from the Java code.

    Use the new finalise() method from the MercuryRuntime class inside of a
    finally block.

samples/java_interface/standalone_java/Makefile:
    Fix a minor error.