Improved metadata change handling.

* The clear metadata functions now rederive the derived metadata, and
send the new derivations to the JS side.
* The JS side now observes changes to the derived metadata and updates
the UI where necessary to reflect changes.
* Dirty message generation has been refactored into
Plugin::CheckInstallValidity, which now returns true if the plugin is
dirty.

The editor panel is still not yet updated though.