Denormalize entity ids in Mongo.

When adding charms or bundles, store their URL parts
in separate fields.
Also implement a simple migration strategy.
Rather than running this every time, I wonder if we could just set a flag at the end of the migration to signify that it's been done. Then we'd only need to check that flag to see if we needed to do the migration. Since we make migration functions idempotent, when we start for the first time, we'll run all the migrations (all will be no-ops) and set all the current flags.

We could use a separate collection to hold the flags (just a simple string->bool mapping).

This way, we can potentially end up with a fair number of migrations but not pay
a significant overhead when adding charmstore units (this also makes it reasonable to
have costly migrations that lock the whole database).

What do you think?