Remove global state in wikibase.formatters

Change-Id: I76685700e17b58787e780680f07d75c79f4b4937