SPARK-1171: when executor is removed, we should minus totalCores instead of just freeCores on that executor

https://spark-project.atlassian.net/browse/SPARK-1171

When the executor is removed, the current implementation will only minus the freeCores of that executor. Actually we should minus the totalCores...

Author: CodingCat <zhunansjtu@gmail.com>
Author: Nan Zhu <CodingCat@users.noreply.github.com>

Closes #63 from CodingCat/simplify_CoarseGrainedSchedulerBackend and squashes the following commits:

f6bf93f [Nan Zhu] code clean
19c2bb4 [CodingCat] use copy idiom to reconstruct the workerOffers
43c13e9 [CodingCat] keep WorkerOffer immutable
af470d3 [CodingCat] style fix
0c0e409 [CodingCat] simplify the implementation of CoarseGrainedSchedulerBackend
Improve  building with maven  docs

     mvn -Dhadoop.version=... -Dsuites=spark.repl.ReplSuite test

to

     mvn -Dhadoop.version=... -Dsuites=org.apache.spark.repl.ReplSuite test

Author: liguoqiang <liguoqiang@rd.tuan800.com>

Closes #70 from witgo/building_with_maven and squashes the following commits:

6ec8a54 [liguoqiang] spark.repl.ReplSuite to org.apache.spark.repl.ReplSuite
SPARK-1184: Update the distribution tar.gz to include spark-assembly jar

See JIRA for details.

Author: Mark Grover <mark@apache.org>

Closes #78 from markgrover/SPARK-1184 and squashes the following commits:

12b78e6 [Mark Grover] SPARK-1184: Update the distribution tar.gz to include spark-assembly jar
spark.deploy.retainedApplications
spark.dead.worker.persistence
spark.deploy.recoveryDirectory - Master.scala L51
spark.deploy.zookeeper.url - SparkCuratorUtil.scala L34
spark.repl.class.uri - Executor.scala 313
spark.core.connection.*.threads.* - ConnectionManager.scala
spark.shuffle.netty.connect.timeout - ShuffleCopier.scala L38
spark.mesos.extra.cores - CoarseMesosSchedulerBackend L79
spark.scheduler.allocation.file - SchedulableBuilder.scala L55
spark.resultGetter.threads - TaskResultGetter L33
spark.starvation.timeout - TaskSchedulerImpl L63
spark.task.cpus - L60
spark.logging.exceptionPrintInterval - TaskSetManager.scala L127
spark.jars - SparkContext.scala L122
spark.shuffle.copier.threads - BlockFetcherIterator L329
spark.shuffle.use.netty - BlockManager.scala L446
spark.shuffle.sender.port - BlockManager.scala L59