Add ability to set preferred network stack

Set the preferred IP network stack at runtime, using the extended
property `net.preferIPv4`, with the default being `true`.

This fixes #775 without involving `jruby-launcher`.