Look for the least common ancestor when merging local values.

Summary: Right now we're looking for one value being the ancestor of the other,
and returning nullptr in all other cases. We can do better than that by
searching for the least common ancestor.

Reviewed By: @jdelong

Differential Revision: D1645986

Signature: t1:1645986:1414777888:0f6cf24c3e65240645e74a929a6e1f68d6ecea70
Convert uses of "const SrcKey&" to "SrcKey".

Summary: We've purposely made SrcKey small (64 bits), so might as well pass it
around by value if it's not being modified.

Reviewed By: @jdelong

Differential Revision: D1650522

Signature: t1:1650522:1414706464:2f4b33b69b5020cabcd049398d2aa95e13eda1ca