Allow named functions for the ddoc functions

So map, reduce, ... are valid js and can be linted.
Inspired by: https://github.com/benoitc/erica/issues/28