Israeli Prime Minister Benjamin Netanyahu has dismissed his popular defence minister Yoav Gallant in a surprise announcement.