Optimizing content_migrate queries; implemented getDataQuery and getInsertQuery and tests; refs #10223"
Fixed typo in comment
Ensure that our hook_content_migrate_data_record_alter() runs last
Adapted 'drush content-migrate-field-data' into 'content-migrate-field-data-optimized'. Refs #10223

Also implemented 'drush content-migrate-field-optimized' as a wrapper on rollback, structure, data-optimized.
data-optimized uses getDataQuery() to ensure only 1 select query is run for each field, instead of one for each node.
Seems to work well, see below for test results. Next should try incorporating getInsertQuery() to ensure
only a single insert query is run.

FOR TESTING PURPOSES, just ran `drush content-migrate-field-optimized field_course_note`
Note that the counts look right. Also FYI this only used the getDataQuery() optimization, not getInsertQuery().

mysql> select count(*) from content_field_course_note;
+----------+
|   187600 |
+----------+

mysql> select count(*) from content_field_course_note where field_course_note_value != '';
+----------+
|   180648 |
+----------+

mysql> select count(*) from field_revision_field_course_note;
+----------+
|   180648 |
+----------+

mysql> select count(*) from field_data_field_course_note;
+----------+
|    30866 |
+----------+

mysql> select * from field_revision_field_course_note limit 3;
+-------------+---------+---------+-----------+-------------+----------+-------+-------------------------+--------------------------+
| entity_type | bundle  | deleted | entity_id | revision_id | language | delta | field_course_note_value | field_course_note_format |
+-------------+---------+---------+-----------+-------------+----------+-------+-------------------------+--------------------------+
| node        | catalog |       0 |     14393 |       16443 | und      |     0 | Prerequisite: MGCR 211  | 4                        |
| node        | catalog |       0 |     14393 |       16444 | und      |     0 | Prerequisite: MGCR 211  | 4                        |
| node        | catalog |       0 |     14393 |       54645 | und      |     0 | Prerequisite: MGCR 211  | 4                        |
+-------------+---------+---------+-----------+-------------+----------+-------+-------------------------+--------------------------+

mysql> checksum table content_field_course_note, field_revision_field_course_note, field_data_field_course_note;
+-----------------------------------------+------------+
| Table                                   | Checksum   |
+-----------------------------------------+------------+
| drupal.content_field_course_note        |  619238603 |
| drupal.field_revision_field_course_note | 1984523380 |
| drupal.field_data_field_course_note     | 3458327387 |
+-----------------------------------------+------------+
3 rows in set (0.25 sec)