Learning to Select SAT Encodings for Pseudo-Boolean and Linear Integer Constraints