Correct otag_builtin implementation.

  Previous code was completely incorrect, and not doing the desired
work of creating a single tag identifier object for different builtin
prototypes.
Never cause a failure in the join builtin.

  The return value is available as long as there is a reference to
the thread, regardless of it having being finished.
Do not call pthread_join to flush thread_vector

  Only the main thread should do it to avoid issues with threads
exiting asynchronously, and sometimes the main thread exiting
before a children thread, what causes all sorts of problems.

  Now it uses a simple heuristic to only record 16, or
"(num_cpus + 16) % 16" exited threads to pthread_join when the main
thread exits. Also, calls pthread_join from older to newer thread.
Add new thread builtins to handle mutexes and locks.

  Also add a simple test case to exercise the new builtins.
Correct wrong bounds checking logic when creating vectors of strings.