Ismail Haniya, Gaza's former prime minister, has been named the new head of Hamas, just days after the Palestinian group softened its stance on Israel, recognising the 1967 borders.