BeyondPlanck II. CMB map-making through Gibbs sampling