Added some locks on RS dispatcher and registry

- Avoids some weird behaviour in rare cases
- Added a string representation for Import/ExportEndpoint beans
Added a join() method to ThreadPool

- Allows to wait for all the queued tasks to be executed
- reset_queue() now clears the queue instead of creating a new one