LeBron James scored 41 points as the Cleveland Cavaliers produced a rousing fourth-quarter comeback to beat the Boston Celtics and achieve a winning record for the first time this season.