Bug 849914 - Implement the latest spec changes to PannerNode and AudioListener; r=roc
Part 1: Add DOM bindings for AudioBufferSourceNode loop attributes; r=roc
Part 2: Accept the loop parameters on AudioBufferSourceNodeEngine; r=roc
Part 3: Set the loop parameters on AudioBufferSourceNodeEngine if looping is turned on when start() gets called; r=roc
Part 4: Refactor the logic for borrowing the output buffer from the input buffer; r=roc
Part 5: Implement the looping logic in AudioBufferSourceNodeEngine; r=roc

The logic in this function is based around a while loop where we either
write silende to the output chunk if the playback has not started yet or
if it has finished, or write from the source buffer into the output
chunk.  We run the loop enough number of times in order to write
WEBAUDIO_BLOCK_SIZE frames per channel to the output chunk.

In order to handle looping, we track the status in mLoop.  NotLooping
means that we will never attempt to loop, and once the source buffer is
exhausted and the playback is stopped, we will just write silende to the
output buffer, and announce that we're finished.  In the loop mode,
mLoop is initially WillLoop, which means that we will play back the
buffer until we hit mLoopEnd, and then we will set mLoop to IsLooping
and start from the mLoopStart offset into the source buffer to fill out
the rest of the output chunk.

When writing data to the output chunk, we do some optimizations in the
case where we're writing WEBAUDIO_BLOCK_SIZE frames.  If we're just
writing silence, we call SetNull(), otherwise we call
BorrowFromInputBuffer in order to avoid unnecessary allocation.  In
other cases, we just write the output chunk frame by frame, either using
WriteZeroesToAudioBlock or CopyFromInputBuffer.