Fix bug in HTTP/2 outbound flow control

Motivation:

The outbound flow controller logic does not properly reset the allocated
bytes between successive invocations of the priority algorithm.

Modifications:

Updated the priority algorithm to reset the allocated bytes for each
stream.

Result:

Each call to the priority algorithm now starts with zero allocated bytes
for each stream.
This isn't far from my logic, and in fact I believe one of the first implementations was something like you described.

One thing that is missing here would be the connection window.  If you have more data to send than can fit in the connection window, the data for each stream has to be scaled in some way so that the sum of the data written totals the connection window.

The way I did this was to clip the total amount of data to send by the connectionWindow.  I then determine the number of bytes per unit of weight:
    double bytesPerUnitOfWeight = bytesToWrite / (double) scaledTotalWeight; 
And then determine the amount to write for the stream:
    int writableChunk = (int) Math.round(scaledWeight * bytesPerUnitOfWeight);

I'm sure there are other ways to do this, but this seems to work well.