Added filter spec to filter by pgn, timestamp etc.
Usage:
view={"$each":{"pgn":"6789"}}
view={"$each":{"timestamp":{"$gt":1415335839}}}
Fixed jshint errors.