Optimize output size of kpm pack

parent #652 
The usual pattern for this is:

```C#
List<DependencyContext> contexts;
if (!root.LibraryDependencyContexts.TryGetValue(libraryDescription.Identity, out contexts))
{
      contexts = new List<DependencyContext>();
      root.LibraryDependencyContexts[libraryDescription.Identity] = contexts;
}
contexts.Add(dependencyContext);
```