serialize: impl ToJson for all Encodables

I just wanted to submit this at this point to see if something like this would be accepted. If so, I can clean it up some more, such as converting to `Vec<T>`, etc.

The short is that this is now possible:

```rust
#[deriving(Encodable)]
struct Foo {
  bar: uint
}

foo.to_json(); // => json::Object(TreeMap)
```

fixes #8335