optimize chunk scan; fix compressed size

this will scan each chunk at once instead of page per page.
Also there was a bug in the saved compressedSize of the chunk when using dictionary encoding.
This fixes the bug and adds a workaround to read files saved with the bad value.