build: add link time optimization
build: add link time optimization

For some scenarios the runtime of the compiled code is better if
link time optimization is used. Hence, add it to the build
options.

Unfortunately, the built-in cmake variant does not work, so all
the required changes had to be applied manually.

nmanthey/riss-solver,nmanthey/riss-solver,nmanthey/riss-solver