[BUGFIX] Incorrect grouping of exclude fields in translated backend

If you use the backend in a language other than English, then the
grouping of the exclude fields in the be_group record is messed up when
flexform fields are included.

E.g. in a German backend, all tt_content fields are grouped below pages.

Sort the table names beforehand and afterwards all fields inside each
table.
Besides the patch converts some variables names into meaningful ones.

For TYPO3_4-5, the patch merges the existing unit test into this file.

Change-Id: I28ebc69d5cfc0316bdf44558276d3e939d011c2d
Fixes: #47839
Related: #34098
Releases: 6.2, 6.1, 6.0, 4.7, 4.5
Reviewed-on: https://review.typo3.org/21636
Reviewed-by: Philipp Gampe
Tested-by: Philipp Gampe
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters