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).