LSIF: Refactor tree resolution in codeintel resolvers
Created by: efritz
This consolidates the places where a tree resolver (repo, commit, or path) is constructed. This is a prerequisite to detecting when LSIF dumps reference a commit that no longer exists.