formatter: fix recID not an integer

Fixes the problem in several format elements where the recID is not an integer.

Commits are taken from https://github.com/inspirehep/ops

Shall I prettify/squash the commits or it will be easier to identify them in the future when we rebase inspire/ops and pu if they are kept the same?

This could close https://github.com/jirikuncar/invenio/pull/291