net: fix bufferSize include writableStream length

socket.bufferSize missed to include the length of internal buffers in
writableStream.
typed arrays: replace switch with templates

Convert TypedArray's TypeName implementation to template specialization
instead of a switch() statement.
typed arrays: don't declare as module

TypedArrays is not a module, it is attached to the global object.
Don't register it with Node's module system.