Call repo_clear() in ensure_core_worktree() to free the "struct
repository". Fixes a leak that's been here since 74d4731da1f (submodule--helper: replace connect-gitdir-workingtree by
ensure-core-worktree, 2018-08-13).
Signed-off-by: Ævar Arnfjörð Bjarmason <redacted> Reviewed-by: Glen Choo <redacted> Signed-off-by: Junio C Hamano <redacted>