Move the SplatByte helper to APInt and generalize it a bit.