Record usage of badges

This only a temporary hack and will be done in a saner way after we have
an EntityParserOutput class [1]. Therefor, this also will get tested in
the other patch.

[1] https://gerrit.wikimedia.org/r/#/c/155287/

Change-Id: I767ec181522272d9ad7e9e15b1f13036bcf8a707
Merge "Record usage of badges"