Implement a Once primitive for initialization

Of the 8 static mutexes that are currently in-use by the compiler and its
libraries, 4 of them are currently used for one-time initialization. The
unforunate side effect of using a static mutex is that the mutex is leaked.

This primitive should provide the basis for efficiently keeping track of
one-time initialization as well as ensuring that it does not leak the internal
mutex that is used.

I have chosen to put this in libstd because libstd is currently making use of a
static initialization mutex (rt::local_ptr), but I can also see a more refined
version of this type being suitable to initialize FFI bindings (such as
initializing LLVM and initializing winsock networking on windows). I also intend
on adding "helper threads" to libnative, and those will greatly benefit from a
simple "once" primitive rather than always reinventing the wheel by using
mutexes and bools.

I would much rather see this primitive built on a mutex that blocks green
threads appropriately, but that does not exist at this time, so it does not
belong outside of `std::unstable`.
Convert relevant static mutexes to Once
Move task count bookeeping out of libstd

For libgreen, bookeeping should not be global but rather on a per-pool basis.
Inside libnative, it's known that there must be a global counter with a
mutex/cvar.

The benefit of taking this strategy is to remove this functionality from libstd
to allow fine-grained control of it through libnative/libgreen. Notably, helper
threads in libnative can manually decrement the global count so they don't count
towards the global count of threads. Also, the shutdown process of *all* sched
pools is now dependent on the number of tasks in the pool being 0 rather than
this only being a hardcoded solution for the initial sched pool in libgreen.

This involved adding a Local::try_take() method on the Local trait in order for
the channel wakeup to work inside of libgreen. The channel send was happening
from a SchedTask when there is no Task available in TLS, and now this is
possible to work (remote wakeups are always possible, just a little slower).
Implement std::rt::at_exit

This routine is currently only used to clean up the timer helper thread in the
libnative implementation, but there are possibly other uses for this.

The documentation is clear that the procedures are *not* run with any task
context and hence have very little available to them. I also opted to disallow
at_exit inside of at_exit and just abort the process at that point.
Implement native timers

Native timers are a much hairier thing to deal with than green timers due to the
interface that we would like to expose (both a blocking sleep() and a
channel-based interface). I ended up implementing timers in three different ways
for the various platforms that we supports.

In all three of the implementations, there is a worker thread which does send()s
on channels for timers. This worker thread is initialized once and then
communicated to in a platform-specific manner, but there's always a shared
channel available for sending messages to the worker thread.

* Windows - I decided to use windows kernel timer objects via
  CreateWaitableTimer and SetWaitableTimer in order to provide sleeping
  capabilities. The worker thread blocks via WaitForMultipleObjects where one of
  the objects is an event that is used to wake up the helper thread (which then
  drains the incoming message channel for requests).

* Linux/(Android?) - These have the ideal interface for implementing timers,
  timerfd_create. Each timer corresponds to a timerfd, and the helper thread
  uses epoll to wait for all active timers and then send() for the next one that
  wakes up. The tricky part in this implementation is updating a timerfd, but
  see the implementation for the fun details

* OSX/FreeBSD - These obviously don't have the windows APIs, and sadly don't
  have the timerfd api available to them, so I have thrown together a solution
  which uses select() plus a timeout in order to ad-hoc-ly implement a timer
  solution for threads. The implementation is backed by a sorted array of timers
  which need to fire. As I said, this is an ad-hoc solution which is certainly
  not accurate timing-wise. I have done this implementation due to the lack of
  other primitives to provide an implementation, and I've done it the best that
  I could, but I'm sure that there's room for improvement.

I'm pretty happy with how these implementations turned out. In theory we could
drop the timerfd implementation and have linux use the select() + timeout
implementation, but it's so inaccurate that I would much rather continue to use
timerfd rather than my ad-hoc select() implementation.

The only change that I would make to the API in general is to have a generic
sleep() method on an IoFactory which doesn't require allocating a Timer object.
For everything but windows it's super-cheap to request a blocking sleep for a
set amount of time, and it's probably worth it to provide a sleep() which
doesn't do something like allocate a file descriptor on linux.