Fix GTID encoding and allow comparing GTIDFields.