Integrate REST changes

I started implementing rest stuff on a `feature/rest` branch, but that model might result in merge hell once it's done. Let's merge what's there now and keep it incremental.

This includes:

- Fixes #1685 Image Optimization
- #920 Use me/sites for blog syncing (it filters out jetpack sites, since they won't work until every call can be done through rest)
- REST media uploads

Refs #1521