Solid-state thermal energy storage using reversible martensitic transformations