[SPARK-4268][SQL] Use #::: to get benefit from Stream in SqlLexical.allCaseVersions

In addition, using `s.isEmpty` to eliminate the string comparison.
That is a good point, I don't know why it is a Stream but I guess this change is okay.