Support ls-tree as an api in gandalf

Sorry for the 8 commits. I forgot to do a sync with gandalf repository before my commit. For some reason it's pointing changes that have already been merged in my repository (with rebase).

I updated the docs as well.

This commit also changes a little the contents api since there was a bug when the file was inside a directory.