Bug fix for tdigest merge operation.

Previous implementation was merging tdigests A and B by returning B.
We now merge the two digests. Added a unit test for this operation.