Implement buffer to post extraction.

Turn a concrete buffer into an abstract representation of a post, so
we can manipulate it further in fairly standard ways.
Merge pull request #3 from mdorman/merge

Implement buffer to post extraction.