Limit the max alloc_size to just over 32MB.

this routine is used to allocate various memory pools. One of those pools
happens to be stack pools, and with our large stack size, we allocate over a
gig per call. This puts an upper limit on the max alloc_size of a somewhat
arbitrary 32MB.

A previous approach was to limit that 128 value and make it user definable
through an env var. But Greg pointed at that this is used for all their pools
and thus an allocation limit rather than a bundle limit is more appropriate.

If item_size is large, we don't want to always try to allocate space for
128 items, so it's limited to 32MB, but if item_size is really large (>32MB) we
want to ensure that space can be allocated for at least one bundle. E.G. if a
user sets stack size to 36MB, we still want to be able to allocate at least one
item, otherwise we'd be in some serious trouble.
Remove debugging prints, change max_pool_alloc_size default

Default max_pool_alloc_size to be proportional to hpwar * callStackSize. See
comments in the source for detail.

Also fixes a strncat bounds
some word-smithing
Merge pull request #257 from ronawho/qthreads-max-alloc-size

Limit the memory qthreads uses for it's memory pools

[reviewed by @gbtitus]

Qthreads uses memory pools for things like stacks, thread private data, runtime
data, etc. It assumes that the item size for things in the pool is small,
however our default stack size is quite large. This meant that with qthreads we
were allocating over a GB up front.

This seemed to be a real problem on a 32 bit machine, but the real problem
there ended up being the qthreads lowest common multiple routine was
overflowing (which is fixed in this commit.) Still the work was already put in
to limit the amount of memory and it's something we wanted to do anyways.

This approach modifies qthreads to take the max pool alloc size as an env var,
but if always ensures that at least two items can be allocated. Without this
env var set, qthreads behavior is unaffected. Note that Qthreads team has not
formally reviewed this as they're busy this week, but they will next week.

When we're setting up qthreads we set the max pool alloc size to be a multiple
of hardware parallelism and the call stack size, with the idea that memory will
be proportional to number of cores. We set a lower bound on this so we don't
make all qthreads pool allocations limited, and a maximum size on this for
architectures with many cores, but limited memory.