Implement StagedWrite helper class
Improve component cache IO logic

- Write to temporary file first, so existing files are complete
- Automatically ignore (with warning) corrupted cache entries
Use StagedWrite in the pack task
Fix double commit on staged writes

- Detect double commit as an illegal state
- Remove double commit in component cache
Delete the unused SparseMatrix class
timestamp output in CI builds
fix tslines name
try to fix CI timer invocation
Clean up staged write and tests
Merge pull request #542 from elehack/feature/elehack-cache-io

Add helper for staged file writes