Asyncprogress

Rebased and fixed. Replaces #175 and #181. Closes #169.
Interesting idea.  Whats the reasoning behind avoiding having nan.h include additional headers?