This patch prevents the creation of sys_refindex entries that point to no
table and no record.
Additionally it fixes the array structure for the creation of
sys_refindex records for sys_file relations.
For deleted file references no reference will be created between
sys_file and the referenced table.
The configuration for the uid_foreign field was changed from a select
field for tt_content records to a normal input field to prevent the
creation of invalid refindex data. To which table uid_foreign is
pointing depends on the tablenames field.
To make sure both sides of the relation of a sys_file_reference appear
in the refindex table the exclusion of sys_file_reference as
foreign_table is removed.