re-factor save metadata mapping

Bryan Davis and Gergő Tisza mentioned concern about the special page handler AjaxHandler
use of exit() and set_error_handler(), which is used to save the metadata mapping created by the user.
after reviewing the code and the possibility of extending the API instead i was able to instead
make use of the existing API action=edit call to achieve what is needed; the saving of the
metadata mapping created by the user. this change-set addresses those issues.

Change-Id: I56b661cb58b85eaac7571100e25ab6c47d1cca0c