Duration of antigen receptor signaling determines T-cell tolerance or activation