Refactor couch view looping

Switch from enumeration to sequential for loops.
http://stackoverflow.com/questions/3010840/loop-through-array-in-javascript/3010848#3010848