Finished cleaning up IPI interface. Units conversion hell is fixed.

The conversion for the stress was wrong. Now should be fixed also for different units system than electron.
Much cleaned up code, fixed a couple of warnings. probably ready to send to Axel.