added check to passed in options for definedness of each option

This makes it easier to programmatically generate the options supplied, allowing for a simpler "reset to default" by setting the option passed in to undefined, thus invoking the default.
updated to use Array.forEach instead of for (... in ...) to avoid issues with prototypes (and avoiding explicit hasOwnProperty)

https://github.com/mbostock/d3/wiki/Arrays
(d3 automatically provides a shim for Array.forEach in browsers that have yet to implement it)
Merge pull request #5 from tianon/patch-1

added check to passed in options for definedness of each option
Merge pull request #6 from tianon/patch-2

updated to use Array.forEach instead of for (... in ...) to avoid issues with prototypes (and avoiding explicit hasOwnProperty)