Revert "Revert "libspark/record: Implement writer thread. May or may not improve anything.""

This reverts commit 677776e03a5efc70727838a0bd7b19c09831d5ec.

Conflicts:
	libspark/record.cpp