Avoid chained operations on TraversableLike

Chaining filter / map / flatMaps etc. can be expensive if the
underlying collection is huge, because each of these operations
creates a copy of the collection and applies a function to it.

In terms of actual code, updateRddInfo is rewritten to iterate
through each collection only once. We used to do a filter, then
a flatMap, then another filter on all existing blocks. Now, we
move the filter into the flatMap, and replace it with filterKeys,
which does not copy the underlying map.