Japan pulled off a huge shock for the second Rugby World Cup in succession, beating Ireland 19-12 in Shizuoka.