[analyzer] ExplodedGraph printing fixes

Fixes a number of issues:

 - Global variables are not used for communication
 - Trait should be defined on a graph, not on a node
 - Defining the trait on a graph allows us to use a correct allocator,
   no longer crashing while printing trimmed graphs

Differential Revision: https://reviews.llvm.org/D52183

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@342413 91177308-0d34-0410-b5e6-96231b3b80d8
3 files changed