Improved memory handling in CSStorage.

- limit memory usage
- on memory low clean-up memory
- store data to disk if there are 1000 data points, regardless of time.
Merge pull request #30 from senseobservationsystems/fix-memory_handling

Fix memory handling