Low-hanging optimization fruits

DISCLAIMER: this lacks testing for correctness. It works, but I don't guarantee that it won't introduce a few bugs (given the small number of changes, the bugs should be easy enough to fix, though). I publish it here in case someone is interested and would like to test it properly.

This is a set of commit that fixes (sometimes big) performance issues in pocolog. These are the low-hanging fruits, i.e. the changes that demanded little work.

Nonetheless, for a file of 100, 100Hz streams with 100bytes of data at each sample, we go from:
 - 1.3s loading index file
 - 1:1 replay ratio

to

 - 0.7s loading index file
 - 1:24 replay ratio