Make hashtree_eqc close trees before destroy.

The hashtree API expects its backing leveldb instances to be closed before destroying them. Without this patch, the property would abort quickly with a badmatch error.