Add (very big) test-case for Cue::applySettings()

This is not as robust as perhaps it needs to be, but it does
cover each line of the applySettings routine.

The test was actually broken because of a bug in String::collectWord,
which is also fixed in this patch.