Derive Clone for IpAddr and SocketAddr
Do not execute the callback before cleaning up resources.
Instruct event loops to ignore SIGPIPE when constructed.

libuv does not always catch SIGPIPE.
Working homing UDP socket prototype.
Homed UDP sockets
Make IO thread-safe.

Each IO handle has a home event loop, which created it.
When a task wants to use an IO handle, it must first make sure it is on that home event loop.
It uses the scheduler handle in the IO handle to send itself there before starting the IO action.
Once the IO action completes, the task restores its previous home state.
If it is an AnySched task, then it will be executed on the new scheduler.
If it has a normal home, then it will return there before executing any more code after the IO action.
doc: add condition tutorial
auto merge of #8563 : graydon/rust/2013-08-16-condition-tutorial, r=catamorphism

First cut of a tutorial on conditions.

cc: #6701
Fixed a memory leak caused by the singleton idle callback failing to close correctly. The problem was that the close function requires running inside a callback in the event loop, but we were trying to close the idle watcher after the loop returned from run. The fix was to just call run again to process this callback. There is an additional tweak to move the initialization logic fully into bootstrap, so tasks that do not ever call run do not have problems destructing.
auto merge of #8631 : anasazi/rust/homing-io, r=brson

libuv handles are tied to the event loop that created them. In order to perform IO, the handle must be on the thread with its home event loop. Thus, when as task wants to do IO it must first go to the IO handle's home event loop and pin itself to the corresponding scheduler while the IO action is in flight. Once the IO action completes, the task is unpinned and either returns to its home scheduler if it is a pinned task, or otherwise stays on the current scheduler.

Making new blocking IO implementations (i.e. files) thread safe is rather simple. Add a home field to the IO handle's struct in uvio and implement the HomingIO trait. Wrap every IO call in the HomingIO.home_for_io method, which will take care of the scheduling.

I'm not sure if this remains thread safe in the presence of asynchronous IO at the libuv level. If we decide to do that, then this set up should be revisited.
auto merge of #8656 : toddaaro/rust/idle-opt+cleaning, r=brson

Fixed a memory leak caused by the singleton idle callback failing to close correctly. The problem was that the close function requires running inside a callback in the event loop, but we were trying to close the idle watcher after the loop returned from run. The fix was to just call run again to process this callback. There is an additional tweak to move the initialization logic fully into bootstrap, so tasks that do not ever call run do not have problems destructing.
std: bootstrapping libuv-based fileio in newrt... open & close

the test "touch"es a new file
std: working tests for low-level libuv open, write and close operations
std: add read and unlink to low-level FileDescriptor + end-to-end CRUD test
std: support async/threadpool & sync paths in uv_fs_* calls + add sync test
std: remove fcntl const bindings + making valgrind clean w/ no owned vecs
std: CRUD file io bindings in uvio, fs_open()/unlink() in IoFactory + test
std: rt::io::file::FileStream fleshed out.. needs more work.. see extended

- change all uses of Path in fn args to &P
- FileStream.read assumptions were wrong (libuv file io is non-positional)
- the above will mean that we "own" Seek impl info .. should probably
  push it in UvFileDescriptor..
- needs more tests
std: add FileStream::unlink + more tests
std: adding #[fixed_stack_segment] as needed in new uvll calls