Exact analysis of stochastic resonance and directed transport in potential with time-dependent discontinuity