Expand environment variables in file name during loading.
Add debug option that dumps gradient and covariance matrix in logger after each iteration.
Add missing destroy_stack() call and correct stack_init() parameters.

This commit fixes Bug #812.

The destroy_stack() call was missing in the OpenMP section that was working on a copy of the covariance matrix. This left some values on the stack on exit, leading to an incompletely filled matrix. The matrix element in the lower right corner were thus incorrect. This has been fixed by adding the required destroy_stack() call.

In addition, the stack_init() parameters were not really meaningful. They have now been set to much more meaningful values, reducing considerably the overhead related to the matrix fill.