Refactor posts/replies into threads/posts

Still many open ends and broken templates on this one.