Use constants for legacy error codes
Command and legacy batch classes implement BatchInterface

Also make legacy batch results consistent with the command responses (e.g. convert "n" to "nInserted" for LegacyInsertBatch). This simplifies logic in MappedBatch and BulkResult's merging.