Javascript bug fixes.

* Fixed handling of blank C++ callback result strings.
* Fixed metadata being saved when exiting editor with the Cancel button.
* Fixed logic for deciding when the editor's priority value had been
changed.
Added C++ code for metadata editor saving.

Also refactored the derivation of the "display" metadata, and removed
the unused JSON entries for the individual masterlist, userlist
priorities. Getting game data no longer edits the global message list
for the masterlist either.