compute the objective function. Periodic saving.
Merge branch 'master' of https://github.com/squito/bioasq2013