Add a function to resolve any snapshot branch to its final target
Returns the final branch target along with the resolve chain. Resolve chain will be an empty list for every branch other than an alias type. Supports breaking the chain if it gets too long.