Refactoring. Adding support for top and new posts.

Config files should now contain hot_limit, top_limit, and new_limit
instead of posts_limit.

The code has been split up a bit into different functions, including a
wrapper main function.