Abelian surfaces and jacobian varieties over finite fields