Residents flee to hills after quake off Papua New Guinea; tsunami threat passes