modify the couchdb view api, move functions from couchbeam_view.erl to couch_api_view.erl.