Use original DV type when serializing bad values.

UnDeserializableValue is used to represent values that could not
be unserialized. When re-serializing them, we should restore the original
type and data as it were, instead of saving "bad" as the type.

Change-Id: Ic75833eca87677c65d7f9b6500f6dcfca80aedfb
EntityId rewrite

This includes

* Dropping of id prefix configurability (as previously discussed)
* Separation of the id class and the entity id DataValue (EntityId
no longer derives from DataValue. A new EntityIdDataValue
composites in a EntrityId)
* The EntityId class now has as fields entity type (string) and
id serialization (string)
* New ItemId and PropertyId derivatives, which in the constructor
only take the id serialization. The long term goal is to make
EntityId abstract
* Serialization format compatibility where required. The format
of the DataValue will remain the same for now

Some implications

* No more global state is used
* No more semi-dependency from DataModel on lib
* getPrefixedId is no longer evil and thus not deprecated any more
* EntityId and derivatives no longer expose the id format. A
FooIdDerivative that has a md5 in it can be created if that'd make sense
* One can type hint against ItemId or PropertyId, which are
guaranteed to be valid ids for the correct entity type

This is a breaking change for Wikibase, which needs to have
https://gerrit.wikimedia.org/r/#/c/80506/ merged soon after
this commit goes in.

Change-Id: I9b05e8305967f7cd3cf121bcd28d59e820c3c5b0