Rename ThreadDeleter to ThreadCloser and add proper ThreadDeleter
Make MP4Filestream copy all metadata on first frame output

This should resolve problems between outstanding save requests in
the replay buffer and mp4 output
Limit ReplayBuffer thread init time when shutting down

In particular, querying all encoder metadata has
to be completed before any of the encoder
destructors are allowed to run. Normally this isn't
a problem, unless saving and stopping the replay
buffer happen in quick succession