[backend] Perf fix: only load tenv and cfg files once per each file, instead of once per procedure.
[backend] Perf fix: only load tenv and cfg files once per each file, instead of once per procedure.

Summary:
This fixes a perf issue on large files, where a copy of the type environment and control flow graph were loaded for each procedure analyzed in the file.
If the type environment or the control flow graph are big, and the file contains many procedures, this can cause a big memory overhead.

Reviewed By: jvillard

Differential Revision: D4008655

fbshipit-source-id: 11d07c1

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