Hamas is losing popularity and support among the Palestinian population and its key regional allies. How will that shape the group’s future?