Refactor EntityInfoBuilder

EntityInfoBuilder is now a stateful builder that wraps the entity
info array.

This change also introduces EntityInfoBuilderFactory and moves
related things to the Wikibase\Lib\Store namespace.

Change-Id: If2576071871705e7fc03cbc61cd26e4c3f7b1ae4
Merge "Refactor EntityInfoBuilder"