Added out promise/future.

1. fixed compat headers. this can break builds on c++11 compiler.
2. added compat headers for thread and mutex.
3. added error class.
4. added concurrency::future