Fix "unix_time" output

Before I was (implicitly) using the problem's time() function.
Improve and add test for energy calculations

* Generalise integration over X functions

* Add test for energy calculations in two cases:
  sphere (check vs known values)
  cubeoid (check vs previously calculated values)

* Add some new factory functions needed for tests
Add optimised function for Green's function calculation

* Callgrind showed that it dominates the BEM calculation time
* Use C-arrays not vectors
* some small changes to the order of calculation
* Optimised version is compared vs old version in PARANOID
Slight optimisations to vector helper functions

* Cache calls to size() where used multiple times

* Avoid initialising vectors twice in some places
Remove useless and long broken test llg_exchange