String API updates, stronger unit tests for updated features

Several string functions that potentially deal with string literals can be
told to figure out the length of the string automatically by supplying a
'length' parameter less than 0.

I've updated string unittests to test both possibilities, for functions which
can make use of this feature.

(Replaces #273)