[SPARK-2443][SQL] Fix slow read from partitioned tables 

This simply incorporates Shark's [#329](https://github.com/amplab/shark/pull/329) into Spark SQL. Implementation credit to @chiragaggarwal.

@marmbrus @rxin @chenghao-intel

## Benchmarks
Generated a local text file with 10M rows of simple key-value pairs. The data is loaded as a table through Hive. Results are obtained on my local machine using hive/console.

Without the fix:

Non-partitioned | Partitioned (1 part)
------------ | -------------
First run: 9.52s end-to-end (1.64s Spark job) | First run: 36.6s (28.3s)
Stablized runs: 1.21s (1.18s) | Stablized runs: 27.6s (27.5s)

With this fix:

Non-partitioned | Partitioned (1 part)
------------ | -------------
First run: 9.57s (1.46s) | First run: 9.30s (1.45s)
Stablized runs: 1.13s (1.10s) | Stablized runs: 1.18s (1.15s)


Yeah, the code is from Shark, and it is a little bit tricky. I think the logic here is:
* We assumes the table object inspector is always a lazy objectinspector, and the deserializer always produces the lazy objects
* We assumes the ObjectInspectorConverter always produces NON LAZY objects if the objectinspectors ARE NOT compatible.
* If `convertedRow` is the lazy object, which means partition objectinspector is compatible with the table objectinspector(`convertedRow` can be retrieved directly), otherwise, the non lazy `convertedRow` is not acceptable by the table object inspector( table object inspector is the lazy object inspector), hence we need to convert it by serializing and de-serializing again.

I don't think we need to maintain the logic here, as we can provide a better solution for the partition based table scanning. All we need to do is converting the `raw object` into `MutableRow` directly, as we did in `HiveTableScan` of Spark.