Add a string generation benchmarking tool

This adds a tool to benchmark the string generation library. It supports
multiple block sizes and threads.
Add an architecture-dependent locking system

This updates the locking to allow architecture-dependent locking. In many
cases, locks other than pthread_mutex are faster, such as OSSpinlock on
OS X.