Format, FormatVersion: allow foreign keys to be nullable

fixes #5626.