[thread-safety] refactor logic for summary application
[thread-safety] refactor logic for summary application

Summary:
Reorganize by using a top-level iteration over the access map and using a helper function for updating the caller accesses.
The new code is shorter and much more readable.

Reviewed By: peterogithub

Differential Revision: D4740657

fbshipit-source-id: 8e18cd5

jvillard/infer,jvillard/infer,ropas/infer,blzq/infer,facebook/infer,blzq/infer,ryoon/infer,facebook/infer,ryoon/infer,ropas/infer,jsachs/infer,facebook/infer,jsachs/infer,ropas/infer,jvillard/infer,blzq/infer,facebook/infer,blzq/infer,ropas/infer,blzq/infer,jvillard/infer,ropas/infer,facebook/infer,ryoon/infer,ryoon/infer,jvillard/infer,ryoon/infer,ropas/infer,blzq/infer,facebook/infer,ryoon/infer,facebook/infer,jsachs/infer,jsachs/infer,jvillard/infer,jvillard/infer,jsachs/infer,jsachs/infer