The large deviation of the Kolmogorov test for a Brownian bridge with general trend with applications to change-point problems in regression models