[ProfileData] Use a different data structure to save memory.
[ProfileData] Use a different data structure to save memory.

This change swaps FunctionSamples to a std::map. This saves us around
17% of the memory required to parse sample profiles. To put hard numbers
on this, clang now eats around 1.3GB of RAM instead of 1.6GB while
parsing a 50MB profile.

The CPU time taken by a large profile merge (3.1GB of data across 226
files) is also reduced by ~11% by this patch (1:09.08 vs 1:01.11).

This was split out at the request of reviewers in D41152.

git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@320764 91177308-0d34-0410-b5e6-96231b3b80d8
(cherry picked from commit f1cb8efedeb65da55ff87449a6c83ad7e839b090)

apple/swift-llvm,apple/swift-llvm,apple/swift-llvm,apple/swift-llvm,apple/swift-llvm,apple/swift-llvm,apple/swift-llvm,apple/swift-llvm