Move persistence functions for Twitter documents into separate module.

/cc gh-15