Changes to work with Ari's setup
Use fetch_hash instead of fetch_row so that columns can be referenced by name
Mirror the PHP code a little more closely.
Misc cleanups
Add a task which ensures that the ruby span-inserting code is behaving correctly.

It checks both that approximately the same spans are inserted as the PHP
code inserts (same number, with same ids, with approximately same
content) and that the text content is the same as the text content of
the original HTML.
Add a Ruby implementation of stripslashes and run it on a few of the strings in the database, as the PHP code does.
Import sections while importing works.
Import annotations when importing a section.
Migrate sections regardless of whether they have annotations.
Don't migrate deleted annotations.
Ensure that we do not modify whitespace while inserting spans.
Use position of spans in the text content to recover positions of annotations.
Extract the annotations migration from rails and data store stuff.
Switch to using phuby for stripslashes.
Remove mysql exception handling.

When a mysql exception happens, there isn't really anything we can do.
The script should really just crash.

This is not documented, but connection objects are closed automatically
when they are garbage collected[0], so the "con.close if con" lines
are unnecessary. The mysql2 gem, which we may switch to at some point,
also has this behavior, and it is actually documented[1].

[0] https://github.com/luislavena/mysql-gem/blob/master/ext/mysql_api/mysql.c#L86
[1] http://rubydoc.info/gems/mysql2/Mysql2/Client#close-instance_method
Use more string interpolation.
Switch to the mysql2 gem.

This gem has some logic for returning data with ruby types appropriate
to the original sql data. Unfortunately it still does not have an
adequate parameterized query interface.
Parameterize the annotation migration function on the amount of whitespace before the document in its container.

This was needed for Annotation-Studio, but seems to be unnecessary for
the meteor-based app, so we want to be able to use different values if
necessary.
Don't create db connection inside annotation migration function.

Require a connection object to be passed in.
Add a function for checking whether a section content is considered "empty" and a task for running that on the whole database.