Japan had its best-ever showing at a Winter Games with 18 medals in an event that will be remembered for its complicated circumstances as much as its thrilling athletic displays.