Allow casper restart in stdio server

Always run the server event loop while casper is not running. This hacks
around the blocking behavior of the phantom readLine implementation.