Add butter to pan and melt; reduce heat to medium-low and add onions. Season with a little salt, fresh ground black pepper, ground thyme and bay; cook until light caramel in color, about 15 minutes. Add apples (if using) and cook 10 minutes more. Add bourbon to pan and let it evaporate. Add stock and remove bay; reduce heat to low.