Fixing issue with STI and bulk import

  - When reindexing, the Index.import method checks the type of the
    first record and uses that for all records indexed.
  - Send records through a group_by filter first and then index them in
    groups by type