SPARK-2407: Added internal implementation of SQL SUBSTR()

This replaces the Hive UDF for SUBSTR(ING) with an implementation in Catalyst
and adds tests to verify correct operation.
Good catch -- the `I_` was spuriously committed.  (I had that in my working tree so that I could easily compare Catalyst and Hive `substr` from the console.)