[SPARK-4092] [CORE] Fix InputMetrics for coalesce'd Rdds

When calculating the input metrics there was an assumption that one task only reads from one block - this is not true for some operations including coalesce. This patch simply increments the task's input metrics if previous ones existed of the same read method.

A limitation to this patch is that if a task reads from two different blocks of different read methods, one will override the other.
Since this code does not change any state in CacheManager itself, it should not affect the thread safety of the outer object. So what is important is, will multiple threads call getOrCompute and pass in the same TaskContext (two threads operating on the same task). I don't think that happens since only a single thread operates on each task. Please let me know if I'm missing something.