Make ino's preprocessing work the same as the original Arduino does.

Ported writeProgram, firstStatement of https://github.com/arduino/Arduino/blob/master/app/src/processing/app/preproc/PdePreprocessor.java
from Java to Python

fixes https://github.com/amperka/ino/issues/35