[BOOTSTRAP] add more native type declarations
Do not segfault on sending to closed socket

carlin++ for reporting the error.
The problem was that send() and write() tested $!PIO for truthness,
but a closed socket does not evaluate to False on JVM and Moar