(Bug 5135) Add image resizing (first pass)

This adds the ability to specify sizing in a URL. We will then
dynamically resize the image before returning it to the user. Files are
stored in MogileFS and in a new media_versions table.

This first pass is in-process and doesn't use Gearman, although that
should be implemented before this seriously gets some use.
(Bug 5137) Add basic support for new API

This adds register_api_endpoint functionality to the router and some
basic functions in an API controller.
(Bug 5138) Add media properties

This creates media_prop_list, populates some properties into it, and
updates the LJ::load_props method to use modern error reporting (Carp)
and database handle usage.