Fixed unit tests by making sure resources get cleaned up
Renamed CBLView.totalDocs to totalRows

(Not public so this isn't an API change.)