Structure and magnetic properties of iron nanowires encased in multiwalled carbon nanotubes