From India to France, the implicit meritocratic bargain that underwrote stable societies by providing advancement to new generations is breaking down.