Fixed #785: Create an API allowing to register external threads with HPX, added a new example demonstrating its use.