[CB-3611] Refactor the server side JS signature to contain a

PluginResult instead of success and fail