Germany has freed a Lebanese man who was sentenced to life in prison for hijacking an American airliner and killing a U.S. Navy diver 20 years ago .