JSCBC-128: Added support for performing view queries against the mock.

As a prerequisit of this, document mangement APIs were also
added to allow the creation of design documents to query.

Change-Id: Ic1ea022ab6c4166b9a86245bd98d529745e65e2d
Reviewed-on: http://review.couchbase.org/41466
Reviewed-by: Matt Ingenthron <matt@couchbase.com>
Tested-by: Brett Lawson <brett19@gmail.com>