Fixed NPE when RXCHAR event with no bytes. Closes #1885
Closes #277. Cores files intentionally left out of the commit as they require a different approach and have a different history
Merge pull request #1886 from arduino/ide-1.5.6-r2

Fixes for 1.5.6-r2 release