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

In addition, using `s.isEmpty` to eliminate the string comparison.