update lib, added tree distances forking code from @phylostar
update lib, added tree distances forking code from @phylostar