A Russian space capsule has undocked from the International Space Station (ISS) to take three astronauts back to Earth – two of them having completed a record-long stay on the orbiting laboratory.