Kill webkit_server when parent closes stdin

Alternative to #646. This should work cross-platform (tested on MRI and JRuby).