Properly implement substring for ranges.

For some reason, substring with range arguments was never properly
implemented in the modules even though the runtime function to do so
(string_select) has been present for a while.  It's been a mystery to
many of us how this works, but the guess was that was some form of
promotion.

This commit adds the explicit range version of substring.  It also
changes the return type for the string_select primitive to be c_string
(yet another one I missed).
Initial update to licm to support hoisting wide things

Initial update is simple to stop not-hoisting wide things, and to not hoist
globals.
Add list of currently known failures
update list of regressions
update what variables we check to see if we will perform licm

Licm is not designed to handle functions that have sync or atomic variables in
them. This makes that check also look for references to atomic variables.
Update to licm for hoisting wide things

Because flattenFunctions does funky things, a variable that should be passed by
ref isn't always done so. As a result I also have to check if an argument is a
ref argument in addition to if it is passed by ref.
Update some comm counts

Update comm counts for:
 - distributions/robust/arithmetic/performance/multilocale/alloc
 - distributions/robust/arithmetic/performance/multilocale/alloc_all

This updates the comm counts for most distributions for these tests as they
improved with the updates to licm. Note that alloc_all.replicated did not seem
to change, but I didn't investigate at all.
Remote list of current failures
Clean up licm.

Now that licm has been moved before insertWideReferences, there's no reason to
check for wide things.

I also updated how to check if a variable is passed by reference and added a
better comment to it.
Update compiler perfkey order to reflect licm being moved
Update lots of comm counts for the better!
Remove accidentally added .good file
David's keen eye noticed that there was in fact a working substring
for ranges in ChapelRange.chpl.  I move body of that version to the
CString module in String.chpl.
Merge branch 'master' of github.com:chapel-lang/chapel into fix-range-substring
Merge pull request #286 from sungeunchoi/fix-range-substring

Properly implement `string.substring` for ranges

[reviewed by David]

For some reason, I missed the fact that `string.substring(r: range(?))` was implemented in ChapelRange.chpl.  David did not. 

This commit fixes `string.substring` for ranges.  I moved the existing `string.substring`, which was originally written when c_strings and Chapel strings were treated as the same thing, to the `CString` module as `c_string.substring`.  I added a new `string.substring` for ranges (that calls `c_string.substring` and does not leak c_strings) to handle Chapel strings.  I also changed the return type of the string_select primitive to be c_string (yet another thing I missed in a previous commit).

This should fix test/types/string/sungeun/c_string/substr.future.
Revert changes to alloc.replicated.good

This were unrelated to licm, and have been regressing for a while. I just
blindly copied the results without looking at them before.
Updated comm counts for alloc.cyclic.good

I copied the wrong results before, and more importantly I overrode some real
regressions. licm only changed the get count for this test, and the
fork/fork_nb differences are prior regressions
Merge pull request #293 from ronawho/licm-hoist-wide

Update licm to hoist wide variables

[reviewed by @sungeunchoi]

In what is probably my largest blunder to date, licm never hoisted wide
variables which meant it didn't help --no-local, gasnet, numa, etc.

I haven't come up with a great explanation for why we explicitly didn't hoist
wide things before, however we do now! When Michael gave his presentation on
his remote cache, I was curious as to why licm wasn't helping things, and why
we were doing so many comm calls for things that licm should have helped with.
That was my motivation for originally looking into this.

To hoist wide variables, this rips out the couple of lines that checked for
wide things and fixes a few latent bugs.

bugs in licm that prevented this from just working were:
 - globals were still being hoisted in some cases (other checks missed them)

 - licm does not operate on functions with atomics or syncs/singles
    - However we were only checking for those types, and not checking if the
      function contained references of those types.

 - A particularly tricky one is that variables that are passed by ref are not
   always identified as being passed by ref and instead have in intent for a
   ref variable. This is because of a latent bug in the compiler that has been
   documented. I made a pivotal item to address it and added a note in LICM.
   For now the workaround is to assume all arguments that have a ref type are
   passed by ref and check the type as well as the intent.

In order to check for ref arguments, I moved licm up (so that I didn't have go
through the maze of finding the actual argument through it's wide type.) Doing
so also allows me to remove all the special code checking for wide things

As a result of this there are several tests with substantial comm count
improvements. Note that there should be many more tests that are affected by
this change, but it's already known that licm isn't effective with bounds
checks, and these particular tests happened to through --fast.
Add a couple of string tests that use string in begin and on statements.
Merge pull request #296 from sungeunchoi/test

Add a couple of string tests that use string in begin and on statements.