Common: Rewrite chart utility fuctions providing unit-tests

Depends on https://github.com/lizardfs/lizardfs/pull/59

Introduces unit-tests for charting facilities to serve as an exemplar for further unit-test development.
Verified on Fedora18 32-bit.