The average rank of elliptic curves over number fields