Move chpl_here_* allocation functions from ChapelLocale to LocaleModel

The allocation functions chpl_here_alloc, chpl_here_calloc, chpl_here_realloc,
and chpl_here_free should be defined by the locale model so they can have
different implementations in the different models.

This is a cut/paste from one module to another except one line where I deleted
a call to __primitive("local_check") that I accidentally added in -r21624.

There is additional room for improvement in these procedures that I haven't
done in this commit.

[reviewed by Sung]


git-svn-id: http://svn.code.sf.net/p/chapel/code/trunk@21772 3a8e244f-b0f2-452b-bcba-4c88e055c3ca
Add filename/lineno information to chpl_string_widen(). [reviewed by bradc]

Among the functions declared in chpltypes.h that could result in memory
allocation, chpl_string_widen() was the only one declared without
filename/lineno information.  When calling chpl_tracked_task_calloc(), it
supplied 0 and NULL for the line number and filename, respectively.

This patch pipes the source file and line number information through that
function, to support error reporting and debugging.  The main change is the
signature and implementation of chpl_string_widen() in chpltypes.{h,c}.

The one test affected by this change was updated to run correctly under
standard, --no-local, and gasnet configurations.  Since chpl_string_widen() is
called only if wide strings are used, the added code is not exercised in the
standard configuration.  For the test in question (memmaxExceedsLineno2), the
call to chpl_string_widen() is associated with the line preceding the one on
which a deliberately outsized string is allocated.  This was handled by putting
the standard behavior in a .comm-none.good file and accounting for the wide
behavior with the undecorated .good file and a .no-local.good file.

Code generation was updated in expr.cpp to pass source file information to
chpl_string_widen(), and an invocation of SET_LINENO was added in
narrowWideReferences(), to ensure that correct source file info was being
created for the case at hand.

[tested with gasnet and no-local]


git-svn-id: http://svn.code.sf.net/p/chapel/code/trunk@21773 3a8e244f-b0f2-452b-bcba-4c88e055c3ca