Fix bug 869480 and bug 809495: infrastructure for user bans.

Don't merge yet; this is mostly out here for review, and needs front-end work and a settings change to enable.

This is a simple model for user bans, and a middleware which enforces
them. The middleware will log out any request from a banned user, and
show them a page which can explain that they're banned, and show the
reason for the ban, before letting them proceed to their requested
page.

A simple user-banning view (keyed off permission to create the UserBan
model) is also included, collecting appropriate details on who issued
the ban and why.