Josh Taylor became the first British fighter to hold all four major world titles in a division after overcoming Jose Ramirez at junior welterweight.