Added optimisations on lem monitor rendering

lem1802 20% -> 10% (on test2 program)
lem1803 13% -> 6% (on lem1803 program)

Could be more optimised yet (remove all non static multiplications)
The old code is placed after the optimised in comment.