Add time to link lengths.

This join seems slow - investigate faster ways to do it. Maybe limit by
time in a subquery?
Fix equality check operator.
Whitespace.
Fix formatting.
Use monotonic time for duration.
Change parameter name to idiomatic; SQL formatting.
Add feedback on SQLite migration index operations.
Update TODOs.
Ignore dropping an index that doesn't exist.
Document.
Update probe gathering to PostgreSQL.

Also commits added records on shutdown. Uses PostgreSQL extensions to
find the rowid of a peer count record for inserting link lengths.
Revert "Use monotonic time for duration."

This reverts commit 6b89d03557ba6cf4be6d721cecd49f5aad0ec93a.

This is intended to run on Python 2.6, and time.monotonic() is added in
Python 3.3.
Revert another usage of monotonic.

Python 2.6 doesn't have it.
Add more descriptive shutdown messages.
Remove stale PID file on stop too.
Print waiting message during stop every 5 seconds.

Unlike printing at a rate dependent on how quickly the variable
increments this is more consistent, less surprising, and less likely to
print an excessive number of lines.
Fix conflating connection and cursor.
Fix parameter substitution.

Forgot to change from the pysqlite syntax.
Grant sequence updating for inserting results.

The primary keys are sequences. The default value for id is the next
sequence value.
Remove unused (and erronous) sigint handler.

I didn't realize until now that this is a holdover from when there was a
connection pool. On top of that committing in the sigint handler is not
desirable, as it could result in things not not storing all the link
lengths associated with a peer counts entry.