Disable executable stripping on Mac OS X for now.

Currently attempting to run dynamically linked executables that are stripped
fails in the presence of programs that use env runtime trace goal conditions.
This is because stripping such executables with just "strip" (as we currently
do) removes the global variable introduced by env runtime trace goal
conditions.  (The long term fix is to invoke strip with the -x flag, but this
needs to be conditional on the value of --mercury-linkage and we currently
don't have the command line options to support that.)

configure.ac:
	Disable stripping of executables on Mac OS X.
Fix a build error on MinGW systems.

Some versions of the MinGW system headers rely on the types off_t and off64_t
being defined, but they will not be defined if -ansi is enabled.
(This seems to affect MinGW systems using GCC 4.8; I haven't checked other
GCC versions yet.)

configure.ac:
scripts/mgnuc.in:
	Do not compile with -ansi on MinGW systems.
Fix another build error on MinGW systems.

On MinGW system do not try to link against libpthread if that library is not
actually present on the system.  This is an issue in the compiler directory
because we link the compiler against the thread libraries regardless of the
grade.  This is due to the implementation of --make.

configure.ac:
	On MinGW, if we cannot find pthreads then set THREAD_LIBS to empty.
Fix executable stripping on Mac OS X.

Stripping executables on Mac OS X that were built with --mercury-linkage=shared
was resulting in the symbols for the global variables introduced for runtime
trace goal env flags being incorrectly removed.  We need to pass the "-x" flag
to strip to prevent this happening.  This diff adds the ability to pass
different flags to strip depending on the value of --mercury-linkage.

compiler/options.m:
	Add two new options, --strip-executable-{shared,static}-flags, that
	specify what flags are passed to the strip command when --mercury-linkage
	is set to shared or static respectively.

	Add a new option to test that the compiler is sufficiently up-to-date.

compiler/compile_target_code.m:
	Implement the new options.

doc/user_guide.texi:
	Document the new options.

NEWS:
	Adjust the entry for the --strip-executable-command option to mention
	the additional two new options.
Re-enable executable stripping on Mac OS X.

configure.ac:
	Pass -x to strip when linking an executable against Mercury shared
	libraries on Mac OS X.

	Make the up-to-date check require {14.01.-beta,rotd}-2014-05-05
        or later.

scripts/Mercury.config.in:
	Set the default values of --strip-executable-{shared,static}-flags.
Fix resource leaks in dir fold predicates.

The directory stream was not closed if dir.open succeeded in opening
the directory, but failing to read the first entry (which may be as
simple as an empty directory).

The directory stream was also not closed when dir.foldl2_process_dir2
returns an error value.

library/dir.m:
	As above.

tests/hard_coded/Mmakefile:
tests/hard_coded/dir_fold.exp:
tests/hard_coded/dir_fold.m:
	Add regression test.

NEWS:
	Announce change.
Announce recent fixes to the MinGW and MinGW64 ports.

NEWS:
	As above.
Add an option to mandelbrot to make it easier to test parallelism

Add a --parallel command line option to the mandelbrot benchmark that can be
given to use explicitly parallelised routines.  This makes it easier to turn
on and off explicit parallelism, depending on your testing needs.

benchmarks/progs/mandelbrot/mandelbrot.m:
    As above