Fixed Reference plug duplication.

Plugs which were loaded from a reference, but had no connections within the reference were being saved as dynamic plugs on the reference node, meaning that they doubled up next time the script was loaded. Reference::isReferencePlug() is now implemented to match the plug filtering in  Box::exportForReference().

Note that this does mean that any plugs which were added to reference nodes directly without an "__" prefix will no longer be saved, as reflected in the changes to ReferenceTest.testReloadDoesntRemoveCustomPlugs(). This is worth careful consideration during review - @davidminor could you take a look at this in relation to the IE internal code?

This change is an interim measure until we have the opportunity to break compatibility and implement the ideas in #801.
Fixed reloading of References with modified metadata.

This meant changing the reference reloading strategy from keeping old plugs in preference to matching new ones, to always keeping new plugs and ditching all the old ones. This will have repercussions for poorly implemented UIs which were relying on the previous behaviour - these will be addressed in subsequent commits.
Fixed SceneHierarchy and SceneInspector UIs for deleted plugs.

The plug being deleted now triggers a refresh where a new plug is found for display. This is robust to the new Reference reloading behaviour, as well as any other scenario which would remove plugs dynamically.