Once seen as a model for middle-income success, the kingdom has lost its lustre after years of economic underperformance.