Firefox: implement vAPI.app.restart
Firefox: fix copy-paste memory leak
Safari: code styling