Faced with large protests and external pressure, ruling elites need domestic reform and a grand bargain with Washington