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.
Minor: what do you think if we display only two args for the 2-arg case instead of displaying a Integer.MAX_VALUE?