WP_JSON_Posts::get_post_types() should return array, not hash/object

`WP_JSON_Posts::get_post_types()` may have had some old code around. it was returning an object whose keys were the Posttype names, rather than an array of objects. Discovered this while exploring the client-js repo.