A Complete Solution to the Stability of Discrete-time Scalar Systems with A Single Delay