serialize: use Result

All of Decoder and Encoder's methods now return a Result.

Encodable.encode() and Decodable.decode() return a Result as well.

fixes #12292
auto merge of #13107 : seanmonstar/rust/encoder-errors, r=erickt

All of Decoder and Encoder's methods now return a Result.

Encodable.encode() and Decodable.decode() return a Result as well.

fixes #12292
Added a Volatile<T> unstable (experimental) type.

* T is currently bound by the private VolatileSafe trait, which is only
  implemented for `i32` and `u32`.
* Uses the volatile_load/volatile_store intrinsics.
* User define-able types are not currently supported.