[SPARK-2017] [SPARK-2016] Web UI responsiveness with large numbers of tasks/partitions

I address here issues SPARK-2017 and SPARK-2016 by serving the data for the tables under Spark UI web interface as JSON for later rendering, and using javascript in the browser to build the tables from an ajax request on that JSON.

Main addition is exposing paths with the JSON data as:

/stages/stage/tasks/json/?id=nnn&attempt=mmm
/storage/json
/storage/rdd/workers/json?id=nnn
/storage/rdd/blocks/json?id=nnn

I also add a new env variable "spark.ui.jsRenderingEnabled" (true by default) which controls whether to use js to do rendering or not for backward compatibility for people who cannot use js.