Bug 973466 - [settings] refactor wifi panel with AMD pattern

This patch is still under WIP.
nit: why not just use `elements.nicknameInput.value = options.certificateName` ?