Separate viewRefresh() function.
TestNoDDocViewsRefresh().
Started viewRefreshItem() function.
Moved JS helpers from main into cbgb package.
Added viewsLock mutex.

Borrowing the diskLock approach for view refresh concurrency handling.
GetMapFunction().
Emit errors are propagated.