Hierarchical Bound-Tracing subhalo finder and merger-tree builder