libtest: get rid of dependency to ToJson

deriving encodable + using json::PrettyEncoder removes the only ToJson trait implementation in the rust repository outside of libserialize

r=pcwalton