Add primitive std::hash<string> specialization.
Make dictionaries more flexible.

Dictionaries now have a second template parameter to specify the domain types.
(Only the codomain could have been chosen previously.) Moreover, dictionaries
now have value semantics and do not use virtual inheritance anymore.