Avoid potential race condition

We don't want to have a situation where we call start twice.
Add a timeout when running the command

This is useful when debugging tests
fix file descripter was not passed on OS-X

The error "`recv_io': file descriptor was not passed..." that occurs
on OS-X is mascarading an underling `Broken Pipe` error. The source of
the issue was that the connection is beeing closed prematurely
(sometimes). This is a timing issue and hence the different behavior
when re-running the command or using bundler or not.

The patch blocks until the child sends a confirmation message that
everything is established. This confirmation message must also be sent
when the rails application can't be booted.
Refactor the code to fix #2

I wasn't happen with the begin-rescue-end as it meant that the
client.puts was either happening in ApplicationManager or in
Application, depending on the situation.

So I came up with a different flow:

* client sends FD to server
* server sends FD to application
* application either confirms receipt of FD, or dies for some reason
  (e.g. application failed to start)
* server waits for confirmation, or for application to die
* server than passes the status back to client
* client is now able to close the FD