Post-selection inference via algorithmic stability