Pass grunt reference to function options

Some of my options use a reference to `grunt` to do more complex stuff than simple JSON allows.

This patch is backwards compatible and supports both of these syntax for options files:

#### Function
```js
module.exports = function (grunt) {
	return { /* ... */ };
};
```

#### JSON
```js
module.exports = { /* ... */ };
```