Adsorbate-induced reconstruction of O and S on Ni(100): a local model