Bifurcation and stability of multi-lattices with applications to martensitic transformations in shape-memory alloys