Move table row details into doc_viewer directive

-  Moves the template for the table row details into a `doc_viewer` component
- Adds a new `flattenHit` function to `indexPattern` that deals with an entire hit, including merging the metaFields and any stored/scripted fields, removes this logic from the `discover` controller.
- Moves `_formatted` and `_flattened` to `$$_formatted` and `$$_flattened` respectively. This keeps them from being serialized into the spy response output
- Removes the special `mapping` structure from discover, replacing it with the more standard `indexPattern`
- Added new tests for doc_viewer