Add unaltered Arduino v1.0.5 cores back in.
Changes will be needed in wiring_analog.c (analogRead).
Modify wiring_analog.c to use the analogPinToChannel() macro which is required in all mighty-1284p pins_arduino.h files.
Point boards.txt entries to the "mighty" core files.
Update pins_arduino.h files:
  - With new analogPinToChannel() macros.
  - Change LED definition to LED_BUILTIN to be consistent with Arduino 1.0.5.
  - Correct NUM_DIGITAL_PINS in avr_developers and standard variants.