REST API

* If an empty array is returned, return it (instead of a 500 internal server error) - anything else empty or false should still return an error.

Tests

* Add a test to test for that (domains example)
* Fix the can_edit_post_and_assign_new_author test by using a post that exists (and correctly put it in the options array)

Merges r100350-wpcom.
REST API: add blavatar icons to me/sites and sites/$site endpoints.
See http://[private link]

Merges r100338-wpcom.
REST API: add flag so POST endpoints can handle cross origin requests; enable cross origin for /search endpoint

- A bit of a hack to enable endpoints that don't actually accept data to be able to handle cross origin POST requests.
- Added tests for the search endpoint and also for failing cases.

Lots of discussion here: http://[private link]

Merges r100367-wpcom.