Add automatic ref infrastructure for native impl and other usages
XNIO-208 Add writeFinal and sendFinal method to channels

This allows for optimisation of protocols that require writing
termination data, such as HTTP chunking.
Prep 3.2.0.Beta1
Next is 3.2.0.Beta2
Hold the buffer lock in awaitReadable()