1 large onion, quartered, root end intact
1 (5 to 7-pound) smoked ham (shank end)
3/4 cup apricot jelly
1/4 cup water
8 sprigs fresh thyme, stripped
3 tablespoons yellow mustard
4 tablespoons cider vinegar
2 teaspoons molasses
1/2 teaspoon Worcestershire sauce
1/4 teaspoon ground allspice
Pinch ground cloves
1 1/2 cups low-sodium chicken broth
1 tablespoon unsalted butter
1 tablespoon all-purpose flour
Kosher salt and freshly ground black pepper