Subduction of diverging plates and the principles of slab window formation