N1QL: Implement Indexer{} interface.

- Index{} interface is refactored between Indexer{} and Index{}
- Export Refresh() API that shall be defined in Indexer{}.
- uses RWMutex
  - Write-lock is acquired by
    CreatePrimaryIndex(), CreateIndex(), Refresh() and Drop() APIs,
    after necessary network operation is performed.
  - Read-lock is acquired by all APIs that need to access the local-cache.

Change-Id: I1148400aeadbe87a23f7d0bf9d0135c8d409ae78
Reviewed-on: http://review.couchbase.org/44024
Reviewed-by: Sriram Melkote <siri@couchbase.com>
Tested-by: Sriram Melkote <siri@couchbase.com>