Handle duplicate titles.

 * For documents which already have a newer version, just skip it.
 * For documents which have an older version, delete that version and
   import the newer instead.