Better handling big history

- Fetching and creating commits by lots (of 100 max)
- Querying history bounded when knowing the last changeset id wished

& little refactoring