Lattice QCD study of $\pi\Sigma-\bar{K}N$ scattering and the $\Lambda(1405)$ resonance