Telefonica SA’s shares fell after Spain’s Socialist government surprised investors by pushing out the carrier’s long-standing top executive.