A general framework for the identification of jump Markov linear systems