BACKLOG-5418: factory for CMIS and improve the abstraction layer to handle the query to retrieve folders since it's used by all the factories