REST API: updates to the post creation and media v1.1 endpoints

* consolidate code functionality between the post creation and media v1.1 endpoints, so that they use the same function for uploading/creating media
* brings the latest media creation functionality to the post creation endpoint
* allows setting of media attributes via `media_attrs` in the post endpoints, similar to `attrs` in the media endpoints
Merges r109659-wpcom.
REST API: Posts v1.1: Move comment- and ping-related properties to nested "discussion" object property

This is a backwards-incompatible change. `comments_open` and `comment_status` are not synonymous, and can be different if the user chooses to have discussion remain open for a specified number of days (at which point, `comment_status` is `open` but `comments_open` is `false`).

Merges r109553-wpcom.
REST API: posts-list include sticky posts by default in v1.1

Merges r109563-wpcom.
REST API: Post Listing: Resolve PHP error notices

Especially when omitting type or exclude
Notices occur when error logging is high enough, which can occur when using WP_DEBUG.

See: https://github.com/Automattic/jetpack/issues/1341

Merges r109596-wpcom.
REST API: Post Listing: Verify the existence of post__not_in before merging excluded IDs

Previously, post__not_in would always be set by the sticky post logic. We should not rely on this occurring and instead appropriately set the value dependent upon whether a value already exists.

See: https://github.com/Automattic/jetpack/pull/1351

Merges r109669-wpcom.
REST API: check that $sticky is array before setting post__not_in

Merges r109673-wpcom.
REST API: Site Settings: PHP 5.2 compatibility for Jetpack

Prior to PHP 5.4, it was not possible to directly call methods or properties on a newly initialized object.

See: https://github.com/Automattic/jetpack/commit/3244f43fff8f5af2fdf34e2fab5e794ca3214b47#commitcomment-8798989

Merges r109674-wpcom.
Sharing buttons - align More button tray contents

Merges r109375-wpcom.
Sharedaddy (Sharing Buttons)

The sharing buttons do not take into account http vs https, so if you load a permalink over https you will get a different share count from its http counter part. This changeset fixes that so both versions of the permalink will show a full count.

Some notes:
Twitter & Facebook do not normalize the URL or return counts for both, so we have to make separte calls and add up the total. LinkedIn (which gets props) works fine on its own.
Facebook lets us request multiple URLs so we can request both the http and https version and add them up in the same callback. Twitter requires us to grab each separately.

Merges r109122-wpcom.
Sharing: Resolve intermittent failure to display Twitter sharing count

Caused by asynchronous responses not completing in expected order.

Merges r109546-wpcom.
Merges r109548-wpcom.
Merges r109549-wpcom.
Merges r109550-wpcom.