Fixing ArduinoISP low speed SPI timing

Bugs live forever if we don't kill them.

When programming low frequency RC clocked MCU's, ArduinoISP's low speed SPI class BitBangedSPI has very poor timing.

It can be fixed like this:

line 200 (Arduino 1.6.9~1.8.2)

original:

  uint8_t transfer (uint8_t b) {
    for (unsigned int i = 0; i < 8; ++i) {
      digitalWrite(PIN_MOSI, (b & 0x80) ? HIGH : LOW);
      digitalWrite(PIN_SCK, HIGH);
      delayMicroseconds(pulseWidth);
      b = (b << 1) | digitalRead(PIN_MISO);
      digitalWrite(PIN_SCK, LOW); // slow pulse
      delayMicroseconds(pulseWidth);
    }
    return b;
  }

fixed:

  uint8_t transfer (uint8_t b) {
    for (unsigned int i = 0; i < 8; ++i) {
      digitalWrite(PIN_MOSI, (b & 0x80) ? HIGH : LOW);
      delayMicroseconds(pulseWidth);
      digitalWrite(PIN_SCK, HIGH);
      b = (b << 1) | digitalRead(PIN_MISO);
      delayMicroseconds(pulseWidth);
      digitalWrite(PIN_SCK, LOW); // slow pulse
    }
    return b;
  }

I can't comment on this change but if it's well tested I'd say go ahead and submit a pull request to the IDE repository:

ArduinoISP.ino is sort of hidden in the repo:
https://github.com/arduino/Arduino/blob/master/build/shared/examples/11.ArduinoISP/ArduinoISP/ArduinoISP.ino

You might give the ArduinoISP expert @PeterVH a mention in your pull request to see if he has any thoughts.