Journalist spared jail in phone hacking case