fix several race conditions in stats code
fix some race conditions in partition (vbucket) code. there are more still there.
add debugging (pprof) API, fix stats never starting
cache view map functions
fix tests
improve the speed of the Go => Otto conversion functions by not marshalling and unmarshalling json on the way there
remove pointless wrapper functions
convert to sync/atomic and marshal our own json for speed
log view errors instead of ignoring them; change the keys parameter on views from string to []interface{}
Revert "log view errors instead of ignoring them; change the keys parameter on views from string to []interface{}"

This reverts commit 2752648ef40af561f2d37d64ad71a7cc69ea6f6a.
log view errors instead of ignoring them.
add missing dateToArray function for map and reduce