Add -E support in executables, for use by launchers in forwarding the
environment to the user program processes when the underlying system
launcher can't do so.  The changes are:

runtime/src/arg.c
  Add -E option parsing and environment variable setting.

doc/release/README.executing
  Document the new option.

test/execflags/ferguson/help2.good
test/execflags/shannon/configs/help/basehelp.txt
test/execflags/shannon/help.good
  Update the expected "-h" output.

test/execflags/gbt/dash-E-1-opt.chpl
test/execflags/gbt/dash-E-1-opt.execopts
test/execflags/gbt/dash-E-1-opt.good
test/execflags/gbt/dash-E-1-opt.skipif
test/execflags/gbt/dash-E-2-opts.chpl
test/execflags/gbt/dash-E-2-opts.execopts
test/execflags/gbt/dash-E-2-opts.good
test/execflags/gbt/dash-E-2-opts.skipif
  New unit tests.
Merge branch 'master' of github.com:chapel-lang/chapel into dash-E
Ready for unit testing.
Merge branch 'master' of github.com:chapel-lang/chapel into dash-E
Snapshot:
- update parseArgs() to know whether it's the launcher or user
  executable and whether it's parsing -E options or others
- call parseArgs() early to do -E options in main, later for the rest
- call parseArgs() in the launcher
- Merge the two dash-E tests into one, with two .execopts entries.
Add chpl_free_c_string() and use it to clean up leaked c_strings in
string and IO code.
Merge branch 'master' of github.com:chapel-lang/chapel into c_string-leaks
Change the conditional on 's' in chpl_rt_free_c_string() into an
assertion.  This function should only be called from the modules via
chpl_free_c_string() which already employs a null check.
Merge branch 'master' of github.com:chapel-lang/chapel into c_string-leaks
A small rewrite of channel.readstring() to avoid creating intermediate
Chapel strings and also to free intermediate c_strings.

This along with the previous changes reduces the total allocated
memory of regexdna.chpl by about 6% and increases the amount of freed
memory by 96% (which is still less than 10% of the total allocated
memory).
Merge branch 'master' of github.com:chapel-lang/chapel into c_string-leaks
Minor fixes to the -E test:
- Remove the second test (dash-E-2-opts).  There's only on dash-E test
  now, and it handles both the 1-arg and 2-args cases.
- Fix the skipif.  It was backwards.
Rework the -E support.

The significant change here is a complete rework of -E parsing.  In the
course of the review for the earlier version of this, we discovered a
major flaw: because regular command line processing runs after a certain
amount of runtime initialization has already happened, any -E options
that set environment variables needed during that initialization will
not have been seen yet.  In particular, comm layer initialization is
done before command line parsing, so for example GASNet environment
variables would not be available when the GASNet init function was
called.  Thus, -E environment variable setting cannot be done during
regular command line parsing -- that's too late.

To fix this problem, now -E parsing is done earlier, in a separate
command line parsing pass specifically for that purpose.  The major
changes (from the original code, not prior commits on this branch) are:
- The parseArgs() function now takes a mode to tell it whether to just
  parse for -E options or to do normal parsing.  It also takes a flag
  telling it whether it's being called in the launcher or not, since we
  have to skip -E options in normal parsing in the user executable
  (they've already been handled) but attend to them in the launcher
  (though, if they are present there, they have a different meaning).
- I didn't want to duplicate the case-by-case logic of normal parsing
  when doing the -E parsing, because it would create a maintenance
  burden when options changed.  However, during -E parsing we have to be
  able to skip the options that aren't -E ones, and this requires
  understanding which have a sub-argument and which do not.  So, I
  expanded the flagType type and flagList table so that each flag
  (option) has separate fields for its single-dash form, its
  sub-argument, and its double-dash form.  That allowed -E parsing to
  rely on the flagList table to decide when to take into account a
  sub-argument, without having to worry about exactly which flag was
  being dealing with.  As a result of this I also had to rewrite
  printHelpTable() completely, however.
- While in arg.c, I also removed some trailing white space on a few
  lines.

The secondary change here, to the .good files, was to make the help text
for -E show the sub-arg as "<envVar>=<val>" instead of "<name=value>",
as I had it in previous commits on this branch.  This makes it a lot
more like what we already show for "-s".
Merging ChapelRangeBase.chpl into ChapelRange.chpl
I had created a memory leak by having a pointer to a Vec instead of just a Vec
itself.  This makes that variable no longer a pointer.
Update README.executing -E doc to match the help text.
Fix a couple of typos.
Merge pull request #80 from sungeunchoi/c_string-leaks

Add chpl_free_c_string() and use it to clean up leaked c_string in string and IO code

[reviewed by Greg and David]

This commit adds a Chapel level function called chpl_free_c_string() that frees the c_string argument. For now, the runtime function backing this calls chpl_mem_free(), because I believe all of the non-literal c_strings we use are allocated in the runtime using the chpl_mem_*alloc() functions.  For now it probably doesn't matter, but at some point we should consider replacing these with chpl_here_* functions.

In the modules, various c_strings are now freed. In the String/CString modules, the most significant changes were for c_string concatenation, substring, and casts. In the IO module, functions that returned strings now free their temporary c_strings. In the ChapelIO module, the StringWriter frees its c_string field upon destruction, but due to writePrimitive() replacing 'this', an extra call to string_copy() is needed.

There are still a few places I have not yet removed leaks from, in part due to it being a bit messy (multiple concats) and/or cases where the program is going to exit anyways. I've marked the ones I know of via comments.

Finally, I expect that the string type will eventually support a constructor that takes a c_string argument, so I have marked places in the code where we could use such a call rather than freeing the c_string.

A few testing notes:

- The CString module is now always initialized due to the use of chpl_free_c_string(). Two tests .good files were updated to reflect this (printModuleInitOrder.good and countDeadModules.good)

- During my testing, one of the existing known valgrind errors (modules/standard/gmp/ferguson/gmp_dist_array) failed once even when not using valgrind. I hope this commit does not cause extra noise in nightly testing.

- In memory tracking testing, many string and IO heavy tests saw decreases in memory leaks due to freeing string concatenation and io buffers. The extra string_copy() mentioned above increased total allocated memory for some tests, but no increases in leaked memory were seen for the tests in test/release/examples, test/io, test/types/string.  As an example, the total allocated memory of regexdna.chpl increased by about 6%, but the amount of freed memory increased by 96% (which is still less than 10% of the total allocated memory, but that's another story).
Remove tabs.
Merge pull request #92 from hildeth/removeTabs

Remove tabs related to PRIM_TYPE_INIT from primitive.h.