Second-half goals from Ritsu Doan and Ao Tanaka gave the Samurai Blue a historic win in their final World Cup Group E match in Qatar.