Fix goog.json.serialize treatment of functions

`goog.json.serialize` sometimes returns invalid JSON.

```javascript
goog.json.serialize([function(){},function(){}]) // returns '[,]'
```

While it is parseable by the lenient `goog.json.parse`, it is invalid JSON, and breaks for other parsers, e.g. `JSON.parse`.

The behavior is now follows the [ECMAScript standard](http://www.ecma-international.org/ecma-262/5.1/#sec-15.12.3).

```javascript
goog.json.serialize([function(){},function(){}]) // returns '[null,null]'
goog.json.serialize({foo:function(){}}) // returns '{}'
```