The prime minister of Malaysia and his cabinet resigned Monday after months of political turmoil resulted in his loss of…