fixing all lessons (except lesson_3) in tutorial/4_imp++/

**UPDATE**
After fixing the long-lasting issue of mysterious cell order in the output, I changed the goal of this pull request to fixing all lessons of ```imp++``` except lesson_3, which requires the functionality of ```superheat``` and ```supercool``` in the Java backend.

**ORIGINAL DESCRIPTION**
After fixing a small issue in the pretty printer, ```lesson_1``` && ```lesson_2``` of imp++ are fine. I took the liberty to replace the *.out files with the generated outputs. I have checked that they should be correct, but please double check anyway.

I have not added them into regression tests, but I will do that once all lessons of imp++ are cleared.

@grosu @dwightguth please review