A study of the structure of the self-trapped exciton in alkali halides by ab initio methods