Arithmetic of abelian varieties over function fields and an application to anabelian geometry