Move extra::json to libserialize

This also inverts the dependency between libserialize and libcollections.

cc #8784