Production of muons from heavy-flavour hadron decays in pp collisions at √s = 5.02 TeV