Speed up FlowDetail.find

Looking up task by its uuid is quite frequent operation, so it worth
having it executed faster. For that, this commit changes how task
details are stored: we now use uuid -> task detail dictionary instead of
list.

Change-Id: Ie098bf982b5fbca799e0f0f1e736eebff06f9671