Add generic subject store so we can store qualifications and segmentations.

Comes with a dummy store, which never stores anything and is compatible with our current behaviour. Also comes with a memory store for testing purposes.