Model Theory of difference varieties and algebraic dynamics over function fields