Yolk–shell nanorattles encapsulating a movable Au nanocore in electroactive polyaniline shells for flexible memory device