[style] consistent nn. and nn.functional: part 3 `tests`
Continuing https://github.com/huggingface/transformers/pull/12124 this PR takes care of `tests` - a slight variation of the automated code:

```
# deal with torch.nn
perl -pi -e 's|^(\s*)import torch\n|$1from torch import nn\n$1import torch\n|' `grep -Ilr torch.nn tests`
find tests -type f -exec perl -X -pi -e 's{(?<!(from |import |[`#/]))torch\.nn\.}{nn.}g' {} \;
find tests -type f -exec perl -pi -e 's|import torch\.nn as nn|from torch import nn|g' {} \;

# deal with F
find tests -type f -exec perl -pi -e 's|from torch.nn import functional as F|from torch import nn|g' {} \;
find tests -type f -exec perl -pi -e 's|import torch.nn.functional as F|from torch import nn|g' {} \;
find tests -type f -exec perl -pi -e 's|(?<!\w)F\.|nn.functional.|g' {} \;
make fixup
```

One concern is for slow tests that would be missed by CI, so let's be on the lookout for the nightly slow run after this PR is merged.

@sgugger 
> It looks like you have changes in two test fixtures, is that intended?

Oh, I was studying `git diff` and missed the binary change - thank you for noticing it, @sgugger - fixed. 