Ide 1.5.x warnings

This pullrequest fixes most warnings in the AVR and SAM cores. In particular, it:
 - Fixes all `-Wall -Wextra` warnings in the AVR core when compiling the blink sketch for the Uno using the bundled gcc 4.3.2, except for "only initialized variables can be placed into program memory area" (see #1793).
 - Fixes all `-Wall -Wextra` warnings in the SAM core when compiling the blink sketch for the Due using the bundled gcc 4.4.1, except for the USB-related warnings I reported in #1874 and the one caused by #1876.
 - Fixes all `-Wall -Wextra` warnings in the AVR core when compiling the blink sketch for the Uno using an external gcc 4.8.2.

This pullrequest also includes two commits for the SD library from #14 that were still applicable, which I slightly nudged to apply to some moved files, but did not otherwise modify.