Allow get_index to receive DDoc as a doc record

The function `couch_mrview:compact/3` is passing to `get_index`
a prepared #doc record, when `get_index` is expecting DDoc
to be a ddoc's id. As a result view's compaction is crashing
after `fabric:open_doc` call.

This patch allows get_index to receive #doc record directly.

This closes COUCH-2729
1 file changed
tree: 34691e65fc8b2976683e88b32a8323e64adc9dbc
  1. src/