Add the onions and cook over low heat until softened, 5 minutes. Add the wine and cook over high heat until reduced by half, 5 minutes. Add the bay, thyme, juniper berries, figs and stock and bring to a boil. Return the chicken to the pan. Transfer to the oven and braise until the meat is tender, 45 minutes longer.