Add occurrence count in the json output for search engine
Since #972 there is a compile-index command which outputs a json index containing all searchable entries. The intended purpose of this json index is to pass it to a search engine.
Since #976 there is also a count-occurrences command which creates a table containing the number of occurrences for each identifier.
This PR makes the compile-index be able to use the information from count-occurrence. It adds a --occurrences argument to get the path to the table.
The first commit isolate the occurrence code in its own library.
The second commit implements the --occurrences argument of ``compile-index`.
Note that there will be a conflict with #1067 which we will need to resolve (in whichever PR gets merged last).
What's the status of this ?
It was ready for review. Now there are many conflicting files.
It is now rebased and ready for review.