scanbuild20130721

Hi Luigi,

I ran the scanbuild static code analyzer on the core library and test-suite over the weekend. Actually it brought up some possible problems which I try to fix in this commit. 

As far as I see it the only real bug is the one concerning the PertubativeBarrierOptionEngine, also implying the need for changing an expected value value in an associated test case. I assume the expected values were generated using the engine itself (?) so it will be fine to do this change I guess. In every case the new value is close to the original one, but you might want to cross check this once again.

The other changes are more code cleansing.

Thanks a lot
Peter