merge merkle tree

- adding  PR for comments
specs should include error return type too -- there are a few of these to tidy up:

e.g.

```
-spec  get_hash_by_index(mtree(), bin()) -> hash_list() | error().
```

and error() would be defined in `swirl.hrl` as error() -> {error, term()}.