Fix project file update on package changes.

 * Fix object permissions for ProjectFile. Though those are not perfect
   because Collection.add, Collection.remove etc. is still (and was already)
   possible. So in future use read_only_view to only allow read only access
   (for plugins) to some collections.
 * Use TreeMap<string, PackageInfo> instead of TreeMultiMap for packages map.
   No hints in source code found why a multimap is necessary. It does not make
   sense because package names are distinct. Multiple same packages with
   different versions won't work anyway (name clashes).
 * Project.add_package_by_name now returns null if package was already added
   to project.