[SQL] Compute timeTaken correctly

```timeTaken``` should not count the time of printing result.

Author: w00228970 <wangfei1@huawei.com>

Closes #3423 from scwf/time-taken-bug and squashes the following commits:

da7e102 [w00228970] compute time taken correctly

(cherry picked from commit 723be60e233d0f85944d948efd06845ef546c9f5)
Signed-off-by: Reynold Xin <rxin@databricks.com>
[DOC][Build] Wrong cmd for build spark with apache hadoop 2.4.X and hive 12

Author: wangfei <wangfei1@huawei.com>

Closes #3335 from scwf/patch-10 and squashes the following commits:

d343113 [wangfei] add '-Phive'
60d595e [wangfei] [DOC] Wrong cmd for build spark with apache hadoop 2.4.X and Hive 12 support

(cherry picked from commit 0fe54cff19759dad2dc2a0950bd6c1d31c95e858)
Signed-off-by: Patrick Wendell <pwendell@gmail.com>