Stochastic comparisons of lifetimes of series and parallel systems with dependent and heterogeneous components