First pass at extracting csv_model from internal codebase.

Ready for review.
Not sure I like this name, but can't think of a better one at the moment