Initial user login now trigger logging and indexing

* Previously, `Person` objects were automatically created on login, but
  not fulltext-indexed or logged via `log_eventi`.  Now both are done.
  `session.flush` is used to confer an ID to the new user, such that it
  can issue its own `Event` and `Revision` entries.
* Also, some `import` lines were moved into functions to avoid
  import-order issues.  Probably this should be done better.
Add missing override for _display_name
Merge pull request #355 from reciprocity/feature/log-user-creation

Initial user login now trigger logging and indexing
Merge pull request #366 from reciprocity/feature/log_events

57293862 Add missing override for _display_name
Merge remote-tracking branch 'origin/develop' into feature/mapping-cleanup