Stop mangling parameters in search method and Graph constructor.

See https://github.com/petkaantonov/bluebird/wiki/Optimization-killers#3-managing-arguments