Fixing timeout handling during shutdown, making argument const.
Adding hpx::naming::get_locality()
Fixing more compilation problems, optimizing async