Linear response and fluctuation theorems for nonstationary stochastic processes