A General Nogood-Learning Framework for Pseudo-Boolean Multi-Valued SAT