Measurement of the ratio B(t -> Wb)/B(t -> Wq) in pp collisions at sqrt(s) = 8 TeV