Improve dictionary definition.

This change makes a number of improvements:
  - Definitions are no longer indexed in only one way, we
    have the core data and then a number of indexes for
    different situations.
  - Lots more tests over dictionary structure.
  - FeatureId becames a first class citizen in Definition
    this is importantant because a definition didn't make
    sense to pass around on its own before.
  - Sped up dictionary arbitrary (there was an exponential
    explosion in cases, so I have capped the number of base
    features).

Fixes #226.
Fixes #228.

I was fairly liberal with moving things to other files to clean-up
dictionary - if it causes too many issues - I can do it in a couple
of steps - but would prefer to just fix it.
`dictionary.definitions.size == dictionary.byFeatureIndexReverse.size` will not give you the definitions size when failing. `dictionary.definitions must haveSize(dictionary.byFeatureIndexReverse.size)` will give it. Otherwise, in props if there is a need to do several assertions, we can go:
```scala
{ filtered.definitions must contain(_.featureId.namespace == namespace).forall } and 
{ filtered.definitions.size must be_>=(1) } // or filtered.definitions must be_>=(1) ^^ ((_:List[_]).size)
```
or use `ThrownExpectations` to get rid of the `and`.