Groundwork for traversal conversion to URL dispatch.

In order to reduce overall complexity and clearer separation of
concerns, this commit serve as a groundwork in converting from traversal
to URL dispatch ("routes"). This includes:

* Convert all Jinja2 templates to use SQLAlchemy object.
* Initial implementation of class-based URL dispatch views.
* Added pyramid_zcml for storing routes in XML file.
* Remove resource interfaces.
Add Topic.recent_posts for getting latest posts.

This method will retrieve recent posts via index scan by undefer
Topic.posts_count and uses it to calculate range of posts that
should be queried. Unlike in resources implementation where we
select 5 posts order by number DESC then reverse it on Python side.
Add post query implementation in Topic model and remove resources.

This should give feature parity with traversal implementation. Since
we no longer have traversal "resource", post query is now done
exclusively in model. Usage should be the same as before.

Since recent_posts now shared between recent post displaying in
index page and post query, default posts count is now 20 instead
of 5 as we can't give the 20 number via "recent" query.
Handle trailing slash in routes, ensure HTTPNotFound is raise.

All routes now has trailing slash by default and any URL without
trailing slash will be redirected to the URL with slash. This is
in order to make overall URL consistent (and allowing both would
pollute our routes a bit too much.)

In additional to URL change, view now properly return HTTPNotFound
if board or topic does not exists (where it would raise SQLAlchemy
exception before.)
Slight optimization for board retrieval method.

Since all boards are already loaded into self.boards, we could
reduce one round-trip to SQL server by resolving board locally.
Convert remaining POST actions from traversal to routes.

This completes traversal to routes conversion on view side of things
and re-enabled ability to post new topic and reply to a topic.

Implementation is roughtly the same, except we now use "l5" as
redirect path after reply to a topic instead of calculating range
from post number returned after inserting row.
Update all test case to work with routes implementation.

This completes conversion from traversal to route by porting all
existing test cases to use routes and move some test into model.
Merge branch 'feature/routes' into develop