While working on the problem, make the failing as_hash test TODO.

Working on changing our schema loading to be in files we can debug rather
than in memory at runtime.  Going to take a bunch of work to do it right.
Meanwhile, quiet the test.
Extract populating the database.

I want to switch to using Schema::Loader as its meant to be used, creating static
files at module install time rather than at runtime.  This is a first step to
isolating the schema creation process.
Move the database table creation into its own class.

Easier to call it during the build process that way.
Switch from Class::Accessor to Mouse.

More functionality, no additional deps.

The version of Mouse is the one which comes with Debian stable.  Seems a
sane minimum.
Move some of the database management code into its own class.

This simplifies the "should update database" logic.

In the process tidied up our use of accessor types, making sure the
class types we use are always pre-declared to avoid Moose thinking
they're not class types.

Also eliminated the unncessary BUILD method in PBP.  Its now an
attribute default.
Move cache object creation out of BUILD and into an attribute default.

Neater separation of concerns this way.
Move logging into its own role.

Separation of concerns and it lets other classes log.
Move dealing with the actual index file into its own class.

Neatly moves a lot of code out of BackPAN::Index.
Add a HasCache role for those classes which have an App::Cache object.

A small role, but it was getting repeated.

Questionable if BackPAN::Index should use it, given how much it overrides,
but the important thing about the role is it has an App::Cache object,
not the details of how its created.
Move schema creation into the database class.

Not much point in table creation having its own class any more.
Move the code to create indexes into the Database class.

Makes much more sense there.
Move creating the schema object into the Database class.

Where it belongs.
Move the database handle method into the Database class.

This leaves just BackPAN::Index->_populate_database as the only
serious database access outside BackPAN::Index::Database.  Going
to leave that for now as I'm not sure where the index reading
and population should go.  Also that method is most of the
startup cost, its been tuned, and I don't want to mess with it
just now lest I get sidetracked optimizing.
Remove a bunch of modules BackPAN::Index no longer uses.

They've moved to other classes.
Remove the compatibility Makefile.PL.

Its no longer needed.  We're about to add some Module::Build specific code
to build the schema and the Makefile.PL will only confuse things.
Update the MANIFEST.
Remove the TODO test now that it's fixed.
Switch over to static schema generation.

Took a bit of doing.  DBIC::Schema::Loader will only make a schema using load_classes()
or load_namespaces() which spider all of lib/BackPAN/Index/, see non result classes and
freak out.  So we let it make a Schema class and throw it out.

We need to generate the database at build time so Schema::Loader can see it.
Set our App::Cache application otherwise it might use the role's class.
No need to use a temp directory for the database at build time.

We can use the app cache's location just fine.