An American teacher sentenced to 14 years in a Russian jail has been released and is flying home to be reunited with his family.