Added maintenance of program element count and index of current programm
element for the current scope. This is used to decide whether to add a
pop instructions; for all program elements, except the last, a pop
instruction is added. This effectively assumes all program elements are
expressions.

Changed if statements to be compiled as expressions.

Signed-off-by: Jakob Brandsborg Ehmsen <jakobehmsen.github@gmail.com>