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: I6fc129ebe4146de8793b2e6883f8ad64d1c440bb