Performance problems from issue #22

Applying patch suggested on issue #22. Tests using the GEM.inp file suggest that performance is improved using this patch on different CPU architectures with gcc compiler.
Merge remote-tracking branch 'origin/amaya-library' into amaya-library
Updating the CMakeList files

The compilation was not working smootly in the Tier-1 and the SuperMUC clusters. The configuration steps have been updated to correctly compile all the libraries and the main code.