Bayesian reweighting of nuclear PDFs and constraints from proton-lead collisions at the LHC