revert the cmake and related scripts

I've got a problem running cmake lately, and I cannot solve that
as I never used it before.
Also I assume some don't use it
limit number of text gathered to 1000 for each batch

When there's too many messages in a group, querying for all of them fails.
Batch them in sets of 1000 and repeat until complete.

Signed-off-by: Yves-Alexis Perez <corsac@corsac.net>