Make documents aware of their index

the main motivation for this is to allow documents to know which fields
are supported by their index, so that serialization and field validation
can be done properly.

In app.rb, rather than calling Document.from_hash directly, the document
is requested from the backend (which knows its index).

The ElasticsearchIndexingTest has been changed slightly to allow
stubbing the mappings configuration. This has become necessary now that
the a Document will only accept the assignment of field values which are
supported by its index.

I introduced SearchIndexEntry as a common ancestor of Link and Document.
This model seems closer to reality and more readily comprehensible.