Robust entanglement between a movable mirror and atomic ensemble and entanglement transfer in coupled optomechanical system