More unit tests for storage drivers and a bug fix for memory storage

This PR contains several unit tests. It also contains a bug fix for memory storage. The bug could be reproduced with the newly added unit tests in this PR.
I'm not quite sure at this point now. If fact, the driver does not need to hold more than 100 samples, as long as it could return some percentiles, that would be fine.

The ``Percentiles()`` function is actually hard to test: The driver may have their own definition of "percentiles", e.g. they have some weighted algorithm which weighs recent stats higher. In some case, the following unit test may fail with some good reason.

I'm thinking about to remove ``StorageDriverTestPercentiles``, or just test the order of the returned value, i.e. if the 90th %tile is bigger than 80th %tile. What do you think?