[SPARK-2395][SQL] Optimize common LIKE patterns.

Oh, sorry, @marmbrus , I got your mean. ignore my previous comment, please.