Pakistan edge Japan 4-3 to qualify for Hockey World Cup after 8 years