Alloy nanowires: Invar inside carbon nanotubes