Added todo list.
Schema for subscriptions

Create table for subscriptions.

Populate table with subscriptions for attachments and revisions.

Subscriptions will support multiple repositories and Git, even though
code comments themselves don't currently (#13 and #14).
Populate subscriptions for existing comments

Create subscriptions for attachments and revisions using helper

Added `notify` column to flag subscriptions as active (always) or inactive (never)

Added id column to subscription table

Changed column `usertype` to `role`
Added trac-admin command to seed subscriptions

Circular dependencies prevented the database upgrade from _nicely_
handling the creation of subscriptions for existing resources, so all
logic and code has been moved to a new `subscription` module. Various
routines for creating subscriptions have been extracted into standalone
methods, and the code refactored to use objects instead of direct
database queries.
Add model for Subscription
Added `from_attachment()` method

Use Attachment objects instead of manually querying the database. (We
still need the initial manual query as there's no way to get all
attachments.)
Added listeners to create subscriptions
Flesh out `Subscription` model methods

Added `select`, `update`, and `delete` methods to `Subscription` to handle all
CRUD operations.

Changed the signatures on `from_attachment`, `from_changeset`, and
`from_comment` to let the `user`, `role`, and `notify` values be overridden.

Added `for_attachment` and `for_changeset` methods to shortcut queries for
those resource types.

Added `attachment_deleted`, `attachment_reparented`, and `changeset_modified`
event handlers.
Refactored `CodeCommentNotifyEmail` to use subscriptions

Added a `for_comment` query helper.

Changed the notification scheme so that resource authors **always**
receive a "to" notification.

Changed the `notify` column to be a boolean.

Changed the `for_*` signatures to accept an optional `notify` flag.

Changed the `select` signature to accept an optional `notify` flag, and
the method to include the flag in the query.

Changed the `select` method to handle `dict`, `list, and `bool` query
arguments.
Address review points

Re-capitalise SQL keywords.

Improve `Subscription.select()` to handle `unicode` values.

Add `Susbcription.__str__()` to provide a string represention of a
subscription.

Refactor `Subscription._from_dict()` method to use `select()` as a
single source for select queries and `__str__()` to improve logging.
Address review comments #2

Test for `basestring` instead of `str` and `unicode`.

Clearer logging.

Don't explicitly convert `Subscription` to a `str` for logging.
Dropped `role` from `Subscription`

Removed `role` attribute from `Subscription` as it was providing no
real additional value.

All notifications are now sent **to** subscribers, and no longer copied.

Changed some `debug` logging to be `info`.
Merge pull request #44 from schwuk/comment-subscriptions

Extract comment subscriptions as their own module