[SPARK-4061][SQL] We cannot use EOL character in the operand of LIKE predicate.

We cannot use EOL character like \n or \r in the operand of LIKE predicate.
So following condition is never true.

    -- someStr is 'hoge\nfuga'
    where someStr LIKE 'hoge_fuga'


I feel a little complicated about this... This function is not on critical path, so I'd like to refactor it in a more functional and readable (but less efficient) way, for example:

```scala
  override def escape(v: String) = "(?s)" + (' ' +: v.init).zip(v).flatMap {
    case (prefix, '_') => if (prefix == '\\') "_" else "."
    case (prefix, '%') => if (prefix == '\\') "%" else ".*"
    case (_, ch) => Character.toString(ch)
  }.mkString
```