Mahmoud Abbas has accepted the resignation of Prime Minister Rami Hamdallah during a cabinet reshuffle.