In a large skillet, heat the oil. Add the onion and a pinch of salt. Cover and cook over moderately low heat, stirring occasionally, until richly browned, about 20 minutes. Add the butter and melt. Add the ketchup, brown sugar, apple juice, lemon juice, ginger and molasses. Simmer over low heat, stirring occasionally, until thickened and reduced to 2 cups, about 25 minutes. Transfer the sauce to a blender and puree. Season with salt.