Document the __getstate__ and __setstate__ API

Signed-off-by: David Aguilar <davvid@gmail.com>