Prompt and Nonprompt J/ψ Production and Nuclear Modification in pPb Collisions at √s_NN = 8.16 TeV