Add integer multiplication based on Karatsuba's algorithm

  library/integer.m:
    Adds Karatsuba based fast integer algorithm in the function
    `pos_mul_karatsuba' which replaces the call to `pos_mul_list' in `pos_mul'.

    It is a divide and conquer algorithm which uses O(n^1.585) basic
    operations instead of O(n^2). The function expects two positive
    integer variables, the first one must have at most as many digits as
    the second one. It falls back to quadratic multiplication if the
    larger factor has less than `karatsuba_threshold' digits.

    If compiled in a parallel grade, the function uses parallelism for the
    divide and conquer part for numbers with more than
    `karatsuba_parallel_threshold' digits.

    The current values for `karatsuba_threshold' is 35,
    `karatsuba_parallel_threshold' is 10 times this value.
Merge pull request #13 from mgudemann/integer_arithmetic

Add integer multiplication based on Karatsuba's algorithm
Add barriers (for concurrency) to the standard library

Mission Critical IT has maintained a library of code for concurrent
programming.  We're happy to contribute this upstream to the Mercury
project starting with this module implementing barriers.

library/thread.barrier.m:
    Add the new module implementing barriers.

library/thread.m:
library/library.m:
    Add new module.

NEWS:
    Announce the new module.

library/thread.semaphore.m:
    Add a comment.
Add a test case for barriers and fix a bug.

This test case is based off Sebastian Godelet's work, which found a bug that
can occur when release/3 is called on a barrier and then other calls to
wait/3 are made.  The final call to wait/3 tries to execute the normal
'unblock the barrier' code and deadlocks there because the barrier is
already unlocked, specifically a value is already present in the "Go" mvar.
Thanks Sebastian for your test case.

library/thread.barrier.m:
    Handle release/3 properly: release/3 now sets the number of remaining
    threads to reach the barrier to zero, and wait/3 will determine why this
    iz zero (it's normally at least one), and if it is because release was
    called then no error is raised.  The other reasion why the number of
    remaining threads may be zero is because wait has been called too many
    times, in this case wait/3 will throw an exception.

tests/hard_coded/Mmakefile:
tests/hard_coded/thread_barrier_test.exp:
tests/hard_coded/thread_barrier_test.m:
    Add new test case.

tests/hard_coded/thread_test_utils.m
    This module contains code that may be useful for other concurrency
    tests.
Added the times operator for regular expressions, such that one can express
/[a-z]{10}/ in this way: `Regex = range('a', 'z') * 10'.

extras/lex/lex.m:
    Removed unused and unsafe str_foldr function,
    added (T * int) = regexp function.

extras/lex/samples/lex_demo.m:
    Removed whitespace in comments,
    added an input prompt,
    added a lexeme for '//' C++ comments using the new '*' operator.