MB-11612 Fix map reduce timeouts

For long running map and reduce jobs, timeout (default 5 seconds)
was set to terminate them. A terminator thread was spawned which
woke up after timeout period and checked all active map and reduce
contexts and marked long running jobs for termination and bloced
for timeout period. Terminator thread does this in a tight loop.
For jobs that are close to timeout were left to continue processing
for another time slice, thus potenitally these tasks timedout after
2 timeout slices.
With async implementation of map reduce, erlang thread which
issued map or reduce calls blocked in receive loop, which receives
results of map reduce. Receive loop marks the task for termination
after timeout. Since erlang thread is aware of the context, it also
avoids parsing every context to check if it has exceeded its time
slice.

Change-Id: I034264e34fa08c6b6950e8fda4ffb076ede72c62