Bug 1109437 - Remove MOZ_COUNT_{C,D}TOR on refcounted promise classes. r=cpearce

These were accidental and redundant, because refcounted classes get this behavior
automatically. And this is very lucky, because it turns out that our MOZ_COUNT_*
infrastructure can't handle varying-sized instances identified with the same
string, which is exactly what we can get with these templated types.

The only remaining use of these macros is on the non-templated ThenValueBase,
which is happily not variable-sized. \o/
Bug 1109437 - Generalize GetBufferingWait to UseBufferingHeuristics. r=cpearce
Bug 1109437 - Stop using buffering heuristics when they're not requested. r=cpearce

Given that we set the buffering wait to 0 in this case already, the only practical
impact on our behavior of this change is that we'll no longer ping-pong between
states.
Bug 1109437 - Switch m{Audio,Video}RequestPending to a tri-state. r=cpearce
Bug 1109437 - Schedule the state machine thread in MediaSourceDecoder::Load. r=cpearce

This is necessary to get the state machine moving after it's initialized.
MediaDecoder::Load does this, but it looks like we missed this in the override.
So the current code relies on the ScheduleStateMachine call at the end of
TrackBuffer::AppendData to get things rolling. We're going to be removing that
call, so we need to fix this.
Bug 1109437 - Implement non-polling buffering. r=cpearce
Bug 1109437 - Only switch to buffering mode when the reader is waiting for data. r=cpearce