Scotland crash out of the World Cup at the pool stage for only the second time after being beaten by an irrepressible Japan in Yokohama.