PopIt mirroring: Factor out the setting of start_date and end_date
PopIt mirroring: Set start and end dates on alternative names
PopIt mirroring: also include any note on an alternative name
PopIt mirroring: Include new Popolo fields
PopIt mirroring: Set (founding|dissolution)_date for organisations
PopIt mirroring: Use database IDs as the primary ID in PopIt
PopIt mirroring: Show all confused category errors if there are any
PopIt mirroring: Add special cases for orgs with confused categories
PopIt mirroring: strip leading / trailing whitespace from names
PopIt mirroring: If POSTing fails, print the data being POSTed
PopIt mirroring: Generate the ID scheme from the URL's hostname
PopIt mirroring: Add get_popolo_id to ModelBase
PopIt mirroring: The slug_to_id mapping for organisations is unnecessary
PopIt mirroring: factor out generating the organization objects
PopIt mirroring: factor out generating the person objects
PopIt mirroring: Update a comment
PopIt mirroring: add an option for not inlining memberships
PopIt mirroring: split commands to dump Popolo JSON / send to PopIt API

After the earlier refactoring there's a lot of common code involved
in dumping data in Popolo JSON format (suitable for directly importing
into mongodb for example) and sending them to a PopIt instance using
PopIt's API - this code is now moved to pombola/core/popolo.py, and
used by both core_send_people_to_popit and core_export_to_popolo_json.

This commit also includes some minor tidying-up of the code.
Fix the syntax for catching multiple exceptions

Previously, this would only catch ImportError exceptions, due
to the way the amiguity described here:

  http://legacy.python.org/dev/peps/pep-3110/#rationale

... is resolved.
PopIt mirroring: add hooks to add country-specific data for PopIt