fsck: move fsck_head_link() to get_default_heads() to avoid some globals