Annotating instructor search results with count of times taught.

1.  Add column to template.

2.  Add field to form asking how many results to display.

3.  Add annotation to person objects in view.

FIXME: there's a bug in here somewhere.

1.  Search for 50 instructors at latitude 43 and longitude -79 (i.e., Toronto, which has airport_id 108).

2.  Person 7069 shows up as having taught 3 times.

3.  But a raw query on the database:

    ~~~
    select count(*) from workshops_task where person_id=7069;
    ~~~

    shows 46 hits.

FIXME: should use aggregation with `Count` to count number of times people have taught.
Annotating instructors with number of times taught (and improving display).

1.  Using a solution by @wking to annotate person list with number of times taught.
2.  Wrapping the display of search results with `<table>` correctly.
3.  Changing lat/long selection fields to real instead of character.
workshops/templatetags/breadcrumbs.py: Replace smart_unicode with smart_text

smart_text works on both Python 2 and 3 [1], while smart_unicode only
exists in Python 2 [2].

Also drop the smart_str import, since we weren't using it anywhere.

[1]: https://docs.djangoproject.com/en/1.7/ref/utils/#django.utils.encoding.smart_text
[2]: https://docs.djangoproject.com/en/1.7/ref/utils/#django.utils.encoding.smart_unicode
workshops/templatetags/breadcrumbs.py: Use logging for debugging output

The print statement is only in Python 2 (in Python 3 it's replaced by
the print() function).  In any case, this sort of debugging
information is best handled by logging [1].

[1]: https://docs.djangoproject.com/en/1.7/topics/logging/#using-logging
workshops/views.py: Specify sort key explicitly in match()

Avoid:

  Traceback:
    File "/.../django/core/handlers/base.py" in get_response
      111. response = wrapped_callback(request, *callback_args, **callback_kwargs)
    File "/home/wking/src/swc/amy/workshops/views.py" in match
      262. persons.sort()
  Exception Type: TypeError at /workshops/match
  Exception Value: unorderable types: Person() < Person()

In Python 3.4.
workshops/views.py: Add person.num_taught per person

My previous Count() suggestion implemented in 03ecafeb (Annotating
instructors with number of times taught, 2014-12-18) was removing
folks who had never taught.  This commit replaces that approach with
separate database calls for each person, which is less efficient but
works for folks who have never taught.  An alternative approach would
be to use a custom filter [1] to add this information at the UI level.
For an implementation of that approach see [2].  We've gone with the
in-view calculation here because Greg expects we'll be filtering by
this attribute in the future [3].

[1]: https://docs.djangoproject.com/en/1.7/howto/custom-template-tags/#writing-custom-template-filters
[2]: https://github.com/gvwilson/amy/pull/7
[3]: https://github.com/gvwilson/amy/pull/7#issuecomment-67651211
Merge pull request #87 from wking/breadcrumbs-python-3

Cleanups to get the breadcrumb templating working with Python 3
Merge pull request #88 from wking/match-explicit-person-sort-key

workshops/views.py: Specify sort key explicitly in match()
Annotating with instructor count properly
Merging instructor count changes
Merge pull request #86 from gvwilson/adding-instructor-count

Annotating instructor search results with count of times taught.